<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Conditional Alerting in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Conditional-Alerting/m-p/141632#M2286</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_audit action=alert_fired ss_app=* ss_name=PLCY_SVCS_bindqtesvc_RED_status_Sean_TEST triggered_alerts=1 | stats count | where count &amp;gt; 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 &amp;lt;2"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here, first the count of events with &lt;CODE&gt;ss_name=PLCY_SVCS_bindqtesvc_RED_status_Sean_TEST&lt;/CODE&gt; is calculated. If count &amp;gt; 0 then next search will get executed to get the count of alerts for ss_name with prefix &lt;CODE&gt;PLCY_SVCS_bindqtesvc&lt;/CODE&gt;. 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)&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 17:04:03 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2020-09-28T17:04:03Z</dc:date>
    <item>
      <title>Conditional Alerting</title>
      <link>https://community.splunk.com/t5/Alerting/Conditional-Alerting/m-p/141631#M2285</link>
      <description>&lt;P&gt;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:&lt;/P&gt;

&lt;P&gt;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 &amp;gt; 0 | table app_log] earliest=-10m@m | stats count | where count &amp;lt; 2&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:03:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Conditional-Alerting/m-p/141631#M2285</guid>
      <dc:creator>mookiie2005</dc:creator>
      <dc:date>2020-09-28T17:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Alerting</title>
      <link>https://community.splunk.com/t5/Alerting/Conditional-Alerting/m-p/141632#M2286</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_audit action=alert_fired ss_app=* ss_name=PLCY_SVCS_bindqtesvc_RED_status_Sean_TEST triggered_alerts=1 | stats count | where count &amp;gt; 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 &amp;lt;2"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here, first the count of events with &lt;CODE&gt;ss_name=PLCY_SVCS_bindqtesvc_RED_status_Sean_TEST&lt;/CODE&gt; is calculated. If count &amp;gt; 0 then next search will get executed to get the count of alerts for ss_name with prefix &lt;CODE&gt;PLCY_SVCS_bindqtesvc&lt;/CODE&gt;. 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)&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:04:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Conditional-Alerting/m-p/141632#M2286</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-28T17:04:03Z</dc:date>
    </item>
  </channel>
</rss>

