<?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 do I get the difference between the number of events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-the-difference-between-the-number-of-events/m-p/653200#M225738</link>
    <description>&lt;P&gt;I am ingesting advanced hunting logs and I have a main dashboard where I present the number of events per Event Category as single numbers. I want to be able to track the changes in the number of events.&lt;/P&gt;&lt;P&gt;For instance, if Monday has 1,000,000 events but Tuesday has 2,000,000 events then the number of events has increased by 1,000,000.&lt;/P&gt;&lt;P&gt;How can I work out the difference and display this on the main dashboard.&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated&lt;/P&gt;</description>
    <pubDate>Fri, 04 Aug 2023 11:51:42 GMT</pubDate>
    <dc:creator>jhilton90</dc:creator>
    <dc:date>2023-08-04T11:51:42Z</dc:date>
    <item>
      <title>How do I get the difference between the number of events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-the-difference-between-the-number-of-events/m-p/653200#M225738</link>
      <description>&lt;P&gt;I am ingesting advanced hunting logs and I have a main dashboard where I present the number of events per Event Category as single numbers. I want to be able to track the changes in the number of events.&lt;/P&gt;&lt;P&gt;For instance, if Monday has 1,000,000 events but Tuesday has 2,000,000 events then the number of events has increased by 1,000,000.&lt;/P&gt;&lt;P&gt;How can I work out the difference and display this on the main dashboard.&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 11:51:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-the-difference-between-the-number-of-events/m-p/653200#M225738</guid>
      <dc:creator>jhilton90</dc:creator>
      <dc:date>2023-08-04T11:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the difference between the number of events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-the-difference-between-the-number-of-events/m-p/653201#M225739</link>
      <description>&lt;P&gt;Use streamstats to get the previous days count and subtract it from each days count.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| streamstats window=2 current=f last(count) as previous_count
| eval change=count-previous_count&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 04 Aug 2023 12:01:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-the-difference-between-the-number-of-events/m-p/653201#M225739</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-08-04T12:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the difference between the number of events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-the-difference-between-the-number-of-events/m-p/653213#M225748</link>
      <description>&lt;P&gt;Perhaps this might help actually so currently I'm ingesting advanced hunting logs into an index=advanced_hunting and within that index there is EventCategory, which has different categories such as AdvancedHunting-DeviceEvents or AdvancedHunting-DeviceFileEvents. As well as other fields like Timestamp etc&lt;/P&gt;&lt;P&gt;In the main dashboard, I've got a count of each of the EventCategory's which gives me the total number of events in each EventCategory, and I need to find a way to get the difference on a daily basis&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 13:23:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-the-difference-between-the-number-of-events/m-p/653213#M225748</guid>
      <dc:creator>jhilton90</dc:creator>
      <dc:date>2023-08-04T13:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the difference between the number of events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-the-difference-between-the-number-of-events/m-p/653217#M225751</link>
      <description>&lt;P&gt;What search do you already have? Perhaps we can build from there?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 13:55:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-the-difference-between-the-number-of-events/m-p/653217#M225751</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-08-04T13:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the difference between the number of events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-the-difference-between-the-number-of-events/m-p/653221#M225752</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=advanced_hunting EventCategory=AdvancedHunting-DeviceEvents
| streamstats window=2 current=f last(EventCategory) as previous_count
| eval change=EventCategory-previous_count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 17:30:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-the-difference-between-the-number-of-events/m-p/653221#M225752</guid>
      <dc:creator>jhilton90</dc:creator>
      <dc:date>2023-08-04T17:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the difference between the number of events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-the-difference-between-the-number-of-events/m-p/653224#M225753</link>
      <description>&lt;P&gt;OK I had assumed you already had the daily counts by EventCategory, but it appears not. Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=advanced_hunting
| bin _time span=1d
| stats count by _time EventCategory
| streamstats window=2 current=f global=f last(count) as previous_count by EventCategory
| eval change=count-previous_count&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 04 Aug 2023 14:24:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-the-difference-between-the-number-of-events/m-p/653224#M225753</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-08-04T14:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the difference between the number of events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-the-difference-between-the-number-of-events/m-p/653235#M225759</link>
      <description>&lt;P&gt;That's great that gives me the difference between the two days. Now I need to display it like the image&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 15:15:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-the-difference-between-the-number-of-events/m-p/653235#M225759</guid>
      <dc:creator>jhilton90</dc:creator>
      <dc:date>2023-08-04T15:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the difference between the number of events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-the-difference-between-the-number-of-events/m-p/653246#M225762</link>
      <description>&lt;P&gt;In that case you don't need to calculate the difference, just set the trend indicator for the single&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ITWhisperer_0-1691165988071.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/26639iB5E63966BE9C2602/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ITWhisperer_0-1691165988071.png" alt="ITWhisperer_0-1691165988071.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Although you do still need to count over time&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=advanced_hunting
| bin _time span=1d
| chart count by _time EventCategory&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 04 Aug 2023 16:21:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-the-difference-between-the-number-of-events/m-p/653246#M225762</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-08-04T16:21:15Z</dc:date>
    </item>
  </channel>
</rss>

