Alerting

Conditional Alerting

mookiie2005
Communicator

I am trying to indicate that a problem has been resolved or is no longer an issue. What I want to do is have an alert that searches to see if a specific alert has triggered in the last 10 minutes. If it HAS then I want to do a secondary search to look for all alerts that begin with the prefix "PLCY_SVCS_bindqtesvc" I want the alert to fire an e-mail if 1 or less alerts with the prefix PLCY_SVCS_bindqtesvc" have been fired. I have been using the below search, but I cannot get it to function in the manner I need. Please help:

index=_audit action=alert_fired ss_app=* ss_name=* triggered_alerts=1 [search index=_audit action=alert_fired ss_app=* ss_name=PLCY_SVCS_bindqtesvc_RED_status_Sean_TEST triggered_alerts=1 | stats count AS count ss_name app_log | where count > 0 | table app_log] earliest=-10m@m | stats count | where count < 2

0 Karma

somesoni2
Revered Legend

Try this

index=_audit action=alert_fired ss_app=* ss_name=PLCY_SVCS_bindqtesvc_RED_status_Sean_TEST triggered_alerts=1 | stats count | where count > 0 
| map maxsearches=1 search="search index=_audit action=alert_fired ss_app=* ss_name=PLCY_SVCS_bindqtesvc* triggered_alerts=1 | stats count | where count <2"

Here, first the count of events with ss_name=PLCY_SVCS_bindqtesvc_RED_status_Sean_TEST is calculated. If count > 0 then next search will get executed to get the count of alerts for ss_name with prefix PLCY_SVCS_bindqtesvc. You can set alert to get trigged if there are any rows retured by the search (it will return one rows with column as count if all conditions are true)

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 ...