Alerting

Alert trigger condition

bhaskar5428
Explorer

i am trying to setup alert for one event , am running on query at specific time.

 

If there are 8 records , email should sent as Success , else it should sent as fail.

 

Currently i have setup a cron susessfully and reeivng proper alert. So now incase there less than 8 rows i need to get failure email i e missing

am unable to to find the settings for the same.  

 

Labels (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @bhaskar5428,

let me understandd: you need an alert (or a report) that checks with a predefined frequency (e.g. one day) youe events and every time sends a message with "Success" or Failure", is this correct?

if this is your need, you should schedule a report or an alert like this:

index=your_index
| stats count
| append [| makeresults | eval count=0 | fields count ]
| stats sum(count) AS total
| eval status=if total=8,"Success","Failure")
| table status

if you defined an alert, you can pass the status value as a token to the content of the eMail.

Ciao.

Giuseppe

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Unlocking Unified Insights: New Gigamon Federated Search App for Splunk

In today’s data-heavy environment, organizations are caught in a data distribution dilemma. As data volumes ...

GA: New Data Management App in Splunk Platform

Streamlining Data Management: Introducing a unified experience in Splunk Managing data at scale shouldn’t feel ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...