<?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: How to trigger alert based on result filed value count in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-to-trigger-alert-based-on-result-filed-value-count/m-p/330709#M11980</link>
    <description>&lt;P&gt;I replied on your other thread. Posting same here&lt;/P&gt;

&lt;PRE&gt;
eventtype=prd_servers sc_status!=300 sc_status!=200 sc_status!=0 | eval computerstatus=host:"-":sc_status | bin span=1m _time  | stats count by _time, computerstatus | search count&amp;gt;10 | eventstats count as occurences by computerstatus | search occurences &amp;gt; 10
&lt;/PRE&gt;</description>
    <pubDate>Tue, 28 Feb 2017 14:44:57 GMT</pubDate>
    <dc:creator>pradeepkumarg</dc:creator>
    <dc:date>2017-02-28T14:44:57Z</dc:date>
    <item>
      <title>How to trigger alert based on result filed value count</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-trigger-alert-based-on-result-filed-value-count/m-p/330708#M11979</link>
      <description>&lt;P&gt;I want to generate alert for the below query if it gives more than 10 results per minute for the continues 10 minutes. I can achieve it from the below query and setting the alert condition as search result equal to 10 and scheduling the alert to run on every 1 minute.&lt;/P&gt;

&lt;P&gt;Query - eventtype=prod_servers sc_status!=200 | eval ComputerStatus=host."-"sc_status | bucket span=1m _time | stats count as TotalErrCount by _time ComputerStatus | where TotalErrCount &amp;gt;10 | stats value(ComputerStatus ) as ErrorCode count by _time&lt;/P&gt;

&lt;P&gt;But the problem is the eval field ComputerStatus comprises of many values (I.e, server1-404, server2-404, server1-500, server3-403.,,,) so in 10 minutes span I am getting result like as below&lt;/P&gt;

&lt;P&gt;02:27 10:01-server2-404&lt;BR /&gt;
02:27 10:02-server2-404&lt;BR /&gt;
02:27 10:03-server1-500&lt;BR /&gt;
02:27 10:04-server1-500&lt;BR /&gt;
02:27 10:05-server1-500&lt;BR /&gt;
02:27 10:06-server1-500&lt;BR /&gt;
02:27 10:07-server3-403&lt;BR /&gt;
02:27 10:08-server3-403&lt;BR /&gt;
02:27 10:09-server3-403&lt;BR /&gt;
02:27 10:10-server2-404&lt;/P&gt;

&lt;P&gt;My alert conditions are satisfied for the above results and alert getting triggered. but I want the alert to be generated if any one of the filed value count is greater than 10 per 1 minute for the continuous 10 minutes. &lt;BR /&gt;
Example&lt;BR /&gt;
02:27 10:01-server2-404 OR server1-500&lt;BR /&gt;
02:27 10:02-server2-404 OR server1-500&lt;BR /&gt;
02:27 10:03-server2-404 OR server1-500&lt;BR /&gt;
02:27 10:04-server2-404 OR server1-500&lt;BR /&gt;
02:27 10:05-server2-404 OR server1-500&lt;BR /&gt;
02:27 10:06-server2-404 OR server1-500&lt;BR /&gt;
02:27 10:07-server2-404 OR server1-500&lt;BR /&gt;
02:27 10:08-server2-404 OR server1-500&lt;BR /&gt;
02:27 10:09-server2-404 OR server1-500&lt;BR /&gt;
02:27 10:10-server2-404 OR server1-500&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:04:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-trigger-alert-based-on-result-filed-value-count/m-p/330708#M11979</guid>
      <dc:creator>Kwip</dc:creator>
      <dc:date>2020-09-29T13:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to trigger alert based on result filed value count</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-trigger-alert-based-on-result-filed-value-count/m-p/330709#M11980</link>
      <description>&lt;P&gt;I replied on your other thread. Posting same here&lt;/P&gt;

&lt;PRE&gt;
eventtype=prd_servers sc_status!=300 sc_status!=200 sc_status!=0 | eval computerstatus=host:"-":sc_status | bin span=1m _time  | stats count by _time, computerstatus | search count&amp;gt;10 | eventstats count as occurences by computerstatus | search occurences &amp;gt; 10
&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Feb 2017 14:44:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-trigger-alert-based-on-result-filed-value-count/m-p/330709#M11980</guid>
      <dc:creator>pradeepkumarg</dc:creator>
      <dc:date>2017-02-28T14:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to trigger alert based on result filed value count</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-trigger-alert-based-on-result-filed-value-count/m-p/330710#M11981</link>
      <description>&lt;P&gt;Thank you! &lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 05:59:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-trigger-alert-based-on-result-filed-value-count/m-p/330710#M11981</guid>
      <dc:creator>Kwip</dc:creator>
      <dc:date>2017-03-02T05:59:13Z</dc:date>
    </item>
  </channel>
</rss>

