<?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 How to get diff between previous day vs current? in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-get-diff-between-previous-day-vs-current/m-p/403295#M4626</link>
    <description>&lt;P&gt;the below search provides me info on failed logins for the past month, for example the last four fridays now i want to alert when a spike occurs for that day or any other day but i am lost at the where  diff &amp;gt; any ideas?&lt;/P&gt;

&lt;P&gt;|tstats count values(Authentication.action) as Action from datamodel="Authentication" where (index=something Authentication.action="failure") by _time span=1day&lt;BR /&gt;
| eval week_day=strftime(_time,"%a")| sort week_day| streamstats current=f last(current) as prev by week_day&lt;BR /&gt;
| eval diff=abs(current-prev)&lt;BR /&gt;
| where diff &amp;gt; blahblah&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 20:09:02 GMT</pubDate>
    <dc:creator>Ghanayem1974</dc:creator>
    <dc:date>2020-09-29T20:09:02Z</dc:date>
    <item>
      <title>How to get diff between previous day vs current?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-get-diff-between-previous-day-vs-current/m-p/403295#M4626</link>
      <description>&lt;P&gt;the below search provides me info on failed logins for the past month, for example the last four fridays now i want to alert when a spike occurs for that day or any other day but i am lost at the where  diff &amp;gt; any ideas?&lt;/P&gt;

&lt;P&gt;|tstats count values(Authentication.action) as Action from datamodel="Authentication" where (index=something Authentication.action="failure") by _time span=1day&lt;BR /&gt;
| eval week_day=strftime(_time,"%a")| sort week_day| streamstats current=f last(current) as prev by week_day&lt;BR /&gt;
| eval diff=abs(current-prev)&lt;BR /&gt;
| where diff &amp;gt; blahblah&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:09:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-get-diff-between-previous-day-vs-current/m-p/403295#M4626</guid>
      <dc:creator>Ghanayem1974</dc:creator>
      <dc:date>2020-09-29T20:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to get diff between previous day vs current?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-get-diff-between-previous-day-vs-current/m-p/403296#M4627</link>
      <description>&lt;P&gt;@Ghanayem1974 ,&lt;BR /&gt;
Try similar to&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:53:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-get-diff-between-previous-day-vs-current/m-p/403296#M4627</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-06-26T07:53:37Z</dc:date>
    </item>
  </channel>
</rss>

