Splunk Search

email alert for time period that contains multiple items

scr4tchfury
Engager

I want to send an email alert only when the last X minutes of a log contains "net1 down", "net2 down", "net3 down", and "net4 down". The messages are on different lines. How can I do this with the Splunk search app? Right now I have it send me an alert with results for "net* down" and eyeball it to make sure not all 4 are there.

Tags (2)
0 Karma
1 Solution

lukejadamec
Super Champion

Schedule a search to run every 15 minutes

Set the alert to trigger if the result count is greater than 3

index=yourindex sourcetype=yoursourcetype  yourfield="*net1 down*" OR  yourfield="*net2 down*" OR  yourfield="*net3 down*" OR  yourfield="*net4 down*"  | dedup yourfield

View solution in original post

lukejadamec
Super Champion

Schedule a search to run every 15 minutes

Set the alert to trigger if the result count is greater than 3

index=yourindex sourcetype=yoursourcetype  yourfield="*net1 down*" OR  yourfield="*net2 down*" OR  yourfield="*net3 down*" OR  yourfield="*net4 down*"  | dedup yourfield

lukejadamec
Super Champion

What is the field name that includes netxdown?

0 Karma

scr4tchfury
Engager

They are 4 different events.

0 Karma

lukejadamec
Super Champion

Are these different lines of the same event, or 4 different events?

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...