<?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 setup alert for x% decrease in count by market? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-to-setup-alert-for-x-decrease-in-count-by-market/m-p/492743#M8763</link>
    <description>&lt;P&gt;Greetings @datamine,&lt;/P&gt;

&lt;P&gt;See my answer here: &lt;A href="https://answers.splunk.com/answering/774433/view.html"&gt;https://answers.splunk.com/answering/774433/view.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Everything should apply, but you'll need to change these lines to fit your use case (and the timechart &lt;CODE&gt;span&lt;/CODE&gt;).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | eval Alert_Type = case (Percent_Increase_5_Mins&amp;gt;5,"Error",
                           Percent_Increase_3_Mins&amp;gt;5,"Warning")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
Jacob&lt;/P&gt;</description>
    <pubDate>Thu, 03 Oct 2019 17:44:04 GMT</pubDate>
    <dc:creator>jacobpevans</dc:creator>
    <dc:date>2019-10-03T17:44:04Z</dc:date>
    <item>
      <title>How to setup alert for x% decrease in count by market?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-setup-alert-for-x-decrease-in-count-by-market/m-p/492742#M8762</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;We are receiving web traffic to one index from multiple markets like the below search. Now we have been asked to setup an alert if there is any decrease in 50% of volume in any market over a time period like an hour or in 30 mins. Can some one help me how to achieve this?&lt;/P&gt;

&lt;P&gt;Charting the Traffic by Market wise:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=webtraffic sourcetype=mobile_traffic marketName=* eventType="ProductAdded" |timechart count by marketName useother=f usenull=f
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 17:21:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-setup-alert-for-x-decrease-in-count-by-market/m-p/492742#M8762</guid>
      <dc:creator>datamine</dc:creator>
      <dc:date>2019-10-03T17:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup alert for x% decrease in count by market?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-setup-alert-for-x-decrease-in-count-by-market/m-p/492743#M8763</link>
      <description>&lt;P&gt;Greetings @datamine,&lt;/P&gt;

&lt;P&gt;See my answer here: &lt;A href="https://answers.splunk.com/answering/774433/view.html"&gt;https://answers.splunk.com/answering/774433/view.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Everything should apply, but you'll need to change these lines to fit your use case (and the timechart &lt;CODE&gt;span&lt;/CODE&gt;).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | eval Alert_Type = case (Percent_Increase_5_Mins&amp;gt;5,"Error",
                           Percent_Increase_3_Mins&amp;gt;5,"Warning")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
Jacob&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 17:44:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-setup-alert-for-x-decrease-in-count-by-market/m-p/492743#M8763</guid>
      <dc:creator>jacobpevans</dc:creator>
      <dc:date>2019-10-03T17:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup alert for x% decrease in count by market?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-setup-alert-for-x-decrease-in-count-by-market/m-p/492744#M8764</link>
      <description>&lt;P&gt;index=webtraffic sourcetype=mobile_traffic marketName=* eventType="ProductAdded" &lt;BR /&gt;
| stats count by marketName,date_hour&lt;BR /&gt;
| delta count as difference &lt;BR /&gt;
| eval percdif=round((difference/count)*100,0)&lt;BR /&gt;
| where percdif&amp;lt;-50&lt;/P&gt;

&lt;P&gt;This should work and depending on this condition you can do the alert.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:23:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-setup-alert-for-x-decrease-in-count-by-market/m-p/492744#M8764</guid>
      <dc:creator>sandeepmakkena</dc:creator>
      <dc:date>2020-09-30T02:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup alert for x% decrease in count by market?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-setup-alert-for-x-decrease-in-count-by-market/m-p/492745#M8765</link>
      <description>&lt;P&gt;hi @sandeepmakkena ,&lt;/P&gt;

&lt;P&gt;It didnt worked. when i run the serach before saving it as alert its not giving me any stats.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Devon&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2019 08:48:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-setup-alert-for-x-decrease-in-count-by-market/m-p/492745#M8765</guid>
      <dc:creator>datamine</dc:creator>
      <dc:date>2019-10-04T08:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup alert for x% decrease in count by market?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-setup-alert-for-x-decrease-in-count-by-market/m-p/492746#M8766</link>
      <description>&lt;P&gt;hi @sandeepmakkena if i remove the date_hour then i get values but its taking the count of all markets as count and taking the difference from that. Is there a way to calculate the difference only from the count of that market alone and then calculate percentage for that market.&lt;/P&gt;

&lt;P&gt;thanks,&lt;BR /&gt;
Devon &lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2019 09:38:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-setup-alert-for-x-decrease-in-count-by-market/m-p/492746#M8766</guid>
      <dc:creator>datamine</dc:creator>
      <dc:date>2019-10-04T09:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup alert for x% decrease in count by market?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-setup-alert-for-x-decrease-in-count-by-market/m-p/492747#M8767</link>
      <description>&lt;P&gt;Thanks @jacobevans !&lt;/P&gt;

&lt;P&gt;But we dont want to have any static count value to be used rather than a dynamic one based on the previous 30 mins/hour count(a specific market) is reduced more than x% percentage to the count(only that market now in last 30min/hour) then it should alert.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
Devon&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2019 10:45:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-setup-alert-for-x-decrease-in-count-by-market/m-p/492747#M8767</guid>
      <dc:creator>datamine</dc:creator>
      <dc:date>2019-10-04T10:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup alert for x% decrease in count by market?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-setup-alert-for-x-decrease-in-count-by-market/m-p/492748#M8768</link>
      <description>&lt;P&gt;Hi @datamine I think you will have hour field in your interesting fields. &lt;BR /&gt;
If not add this &lt;CODE&gt;| eval date_hour=strftime(_time,"%H")&lt;/CODE&gt; before stats command.&lt;/P&gt;

&lt;P&gt;As far count, I did test with my data it is working fine for me, can you add example data.&lt;BR /&gt;
Thanks for your question. &lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2019 17:21:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-setup-alert-for-x-decrease-in-count-by-market/m-p/492748#M8768</guid>
      <dc:creator>sandeepmakkena</dc:creator>
      <dc:date>2019-10-04T17:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup alert for x% decrease in count by market?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-setup-alert-for-x-decrease-in-count-by-market/m-p/492749#M8769</link>
      <description>&lt;P&gt;That's exactly what it does &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; The "5" is a hard-coded percent - not count.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2019 20:07:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-setup-alert-for-x-decrease-in-count-by-market/m-p/492749#M8769</guid>
      <dc:creator>jacobpevans</dc:creator>
      <dc:date>2019-10-04T20:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup alert for x% decrease in count by market?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-setup-alert-for-x-decrease-in-count-by-market/m-p/492750#M8770</link>
      <description>&lt;P&gt;Check out this amazing Q&amp;amp;A (and links):&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/511894/how-to-use-the-timewrap-command-and-set-an-alert-f.html"&gt;https://answers.splunk.com/answers/511894/how-to-use-the-timewrap-command-and-set-an-alert-f.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2019 14:02:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-setup-alert-for-x-decrease-in-count-by-market/m-p/492750#M8770</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-10-08T14:02:08Z</dc:date>
    </item>
  </channel>
</rss>

