<?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 create a threshold alert based on previous data? in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402251#M4587</link>
    <description>&lt;P&gt;Hi @ahmar74,&lt;BR /&gt;
Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|tstats summariesonly count values(Authentication.action) as Action from datamodel="Authentication" where (index=acs Authentication.action="failure") by _time span=1day
|eval week_day=strftime(_time,"%a")|sort week_day|streamstats current=f last(current) as prev by week_day
|eval diff=abs(current-prev)
|where diff &amp;gt; "your threshold value of spike"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 23 Jun 2018 07:17:16 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2018-06-23T07:17:16Z</dc:date>
    <item>
      <title>how to create a threshold alert based on previous data?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402249#M4585</link>
      <description>&lt;P&gt;I started off with the following search which gives me failed authentication to cisco acs on a daily basis, now i want to alert when a spike occurred on either day. For example, Monday received 100 failed logins and the following monday we received 1000 failed logins, i want to alert when that occurs but i am stumped, any suggestions.&lt;/P&gt;

&lt;P&gt;| tstats &lt;CODE&gt;summariesonly&lt;/CODE&gt; count values(Authentication.action) as Action from datamodel="Authentication" where (index=acs Authentication.action="failure") by _time span=1day&lt;BR /&gt;
| convert timeformat="%A %d %B" ctime(_time)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:08:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402249#M4585</guid>
      <dc:creator>ahmar74</dc:creator>
      <dc:date>2020-09-29T20:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a threshold alert based on previous data?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402250#M4586</link>
      <description>&lt;P&gt;If I am getting this correct - you have some data on failed logins on a daily basis, and your alert trigger is based on a day of the week comparison? In the example that you have given,if on the previous Monday you had 100 failed logins and on the following Monday you have 101 failed logins , an alert should be triggered?. Is it possible to attach a snapshot of the output that you are receiving in your statistics tab? May be a mock up? &lt;/P&gt;</description>
      <pubDate>Sat, 23 Jun 2018 07:05:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402250#M4586</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-06-23T07:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a threshold alert based on previous data?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402251#M4587</link>
      <description>&lt;P&gt;Hi @ahmar74,&lt;BR /&gt;
Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|tstats summariesonly count values(Authentication.action) as Action from datamodel="Authentication" where (index=acs Authentication.action="failure") by _time span=1day
|eval week_day=strftime(_time,"%a")|sort week_day|streamstats current=f last(current) as prev by week_day
|eval diff=abs(current-prev)
|where diff &amp;gt; "your threshold value of spike"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 23 Jun 2018 07:17:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402251#M4587</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-06-23T07:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a threshold alert based on previous data?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402252#M4588</link>
      <description>&lt;P&gt;Hi @ahmar74,&lt;BR /&gt;
Did this work for you?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 13:18:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402252#M4588</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-06-25T13:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a threshold alert based on previous data?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402253#M4589</link>
      <description>&lt;P&gt;it looks good but having issues with the where diff, as i don't know a number to input. &lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 14:16:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402253#M4589</guid>
      <dc:creator>Ghanayem1974</dc:creator>
      <dc:date>2018-06-25T14:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a threshold alert based on previous data?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402254#M4590</link>
      <description>&lt;P&gt;actually i keep getting error 'The search job has failed due to an error.'&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 14:19:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402254#M4590</guid>
      <dc:creator>Ghanayem1974</dc:creator>
      <dc:date>2018-06-25T14:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a threshold alert based on previous data?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402255#M4591</link>
      <description>&lt;P&gt;it did not like summariesonly so i removed it, but i can use some help on the where diff &amp;gt;, any ideas? thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 14:57:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402255#M4591</guid>
      <dc:creator>Ghanayem1974</dc:creator>
      <dc:date>2018-06-25T14:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a threshold alert based on previous data?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402256#M4592</link>
      <description>&lt;P&gt;Hi @Ghanayem1974, The value of threshold has to be decided by you based on your environment. You could think about a percentage also , for e.g. if the failures are more than 50% then alert e.t.c&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 02:10:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402256#M4592</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-06-26T02:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a threshold alert based on previous data?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402257#M4593</link>
      <description>&lt;P&gt;how would I write that?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 04:25:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402257#M4593</guid>
      <dc:creator>ghanayem74</dc:creator>
      <dc:date>2018-06-26T04:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a threshold alert based on previous data?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402258#M4594</link>
      <description>&lt;P&gt;Try this run anywhere example&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|tstats count as current where index=_internal by _time
 |eval week_day=strftime(_time,"%a")|sort week_day
 |streamstats current=f last(current) as prev by week_day|fillnull value="NA"
 |eval diff=if(prev=="NA",current,abs(current-prev))
 |eval perc_of_change=round((diff/prev)*100,2)|where perc_of_change &amp;gt; 20
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Jun 2018 07:47:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/how-to-create-a-threshold-alert-based-on-previous-data/m-p/402258#M4594</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-06-26T07:47:57Z</dc:date>
    </item>
  </channel>
</rss>

