Alerting

Alert creation

jagssplunk123
New Member

i wnat to generate an alert whenever one of the text string is missing between two in the same log file every 30 min . Please look into the below query for reference:

| union maxout=10 [ search index=72434_Taxi host=ah-1125888-001* "Finished Reading file for data Load: "] [search index=72434_Taxi host=ah-1125888-001* "Reading file for data Load:"]

I want an alert if any of the string is missing as per above query.

Labels (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

As I understand the question, you have two specific event texts and expect to see other text between them.  The alert is needed if that other text doesn't appear.

The existing query just locates the two boundary texts so it won't alert if the other text is missing.  Ideally, one would search for the Other text and alert if the result count is zero.  I'm assuming that can't be done for $reasons.

Try the transaction command.  There may be other ways to accomplish the job, but this is simple.  This query groups events between "Reading..." and "Finished..." events.  If the number of events in a group is only 2 then the Other text must be missing.

index=72434_Taxi host=ah-1125888-001* 
| transaction endswith="Finished Reading file for data Load: " startsswith="Reading file for data Load:"
| where eventcount = 2

 

---
If this reply helps you, Karma would be appreciated.
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...