<?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: Visualisation : Single Value with Trendline in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Visualisation-Single-Value-with-Trendline/m-p/571583#M10398</link>
    <description>&lt;P&gt;Hi chef,&lt;BR /&gt;&lt;BR /&gt;Yeah I messed up with the timeframes &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Im using the comparison query and its working fine. Thankyou. This really helps me a lot. Thankyou again sir.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Oct 2021 05:37:42 GMT</pubDate>
    <dc:creator>syazwani</dc:creator>
    <dc:date>2021-10-20T05:37:42Z</dc:date>
    <item>
      <title>Visualisation : Single Value with Trendline</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Visualisation-Single-Value-with-Trendline/m-p/571259#M10382</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Im trying to create a single value with trendline visualisation, where I want to compare the difference between todays result with yesterday results. The trendline should be the results difference of&amp;nbsp; yesterday and today.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have applied several solutions, &lt;STRONG&gt;but the total number does not tally with the today's result.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;My base query is:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-SPOILER&gt;index=emailgateway action=* from!="" to!=""&lt;BR /&gt;| stats count&lt;/LI-SPOILER&gt;&lt;P&gt;which result shown as (today result) :&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Base" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16454iA9EE00B0B2A1BF4D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Base.PNG" alt="Base" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Base&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here are several solutions that I have tried:-&lt;BR /&gt;&lt;BR /&gt;Solution 1&lt;/P&gt;&lt;P&gt;Im using the trendline wma2&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;SPAN&gt;index=emailgateway action=* from!="" to!=""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| timechart span=1d count as Total&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| trendline wma2("x") as Trend&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| sort - _time&lt;/SPAN&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;the result shown as below:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Solution 1" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16455i8CF282D98FFDA5BD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Solutyion 1.PNG" alt="Solution 1" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Solution 1&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;- the result shows the trendline, but the total number &lt;STRONG&gt;(90,702)&amp;nbsp;&lt;/STRONG&gt;did not tally with today's result &lt;STRONG&gt;(227,019)&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Solution 2&lt;/P&gt;&lt;P&gt;Im using the delta command :-&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;SPAN&gt;index=emailgateway action=* from!="" to!=""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| timechart span=1d count as Total&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| delta Total p=1 as diference&lt;/SPAN&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;the result shown as below:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Solutyion 2.PNG" style="width: 923px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16456i2B08110F23C509DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Solutyion 2.PNG" alt="Solutyion 2.PNG" /&gt;&lt;/span&gt;&lt;BR /&gt;&amp;nbsp;-&amp;nbsp;the total number is different (including the trendline number)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Solution 3&lt;BR /&gt;&lt;BR /&gt;I tried to use the |tstats command (from Enterprise Security)&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;SPAN&gt;| tstats summariesonly=true allow_old_summaries=true count from datamodel=Email where (All_Email.action=* AND All_Email.orig_dest!="" OR All_Email.orig_src!="") earliest=-48h latest=-24h&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| append&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[| tstats summariesonly=true allow_old_summaries=true count from datamodel=Email where (All_Email.action=* AND All_Email.orig_dest!="" OR All_Email.orig_src!="") earliest=-24h latest=now]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| appendcols&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[| makeresults&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| eval time=now()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| rename time AS _time&lt;/SPAN&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Solution 3" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16457i82B692A200EABCE8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Solutyion 3.PNG" alt="Solution 3" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Solution 3&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;- which also did not work&lt;BR /&gt;&lt;BR /&gt;Can anyone help? Did i missed anything? Please.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 04:53:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Visualisation-Single-Value-with-Trendline/m-p/571259#M10382</guid>
      <dc:creator>syazwani</dc:creator>
      <dc:date>2021-10-18T04:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Visualisation : Single Value with Trendline</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Visualisation-Single-Value-with-Trendline/m-p/571463#M10387</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;syazwani,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;What timeframes are you specifying for your searches? I suspect that's the reason why you're getting inconsistencies in your search.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your enterprise security search you're specifying a 24 hour time period:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;earliest=-48h latest=-24h&lt;/LI-CODE&gt;&lt;P&gt;Which will give you different results depending on the time you run it.&lt;/P&gt;&lt;P&gt;Try the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;Todays current total:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=emailgateway action=* from!="" to!="" earliest=@d
| stats count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Compare yesterday and today:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=emailgateway action=* from!="" to!="" earliest=-1d@d
| timechart span=1d count as total&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Simpler tstats command:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats summariesonly=true allow_old_summaries=true count from datamodel=Email where All_Email.action=* All_Email.orig_dest!="" All_Email.orig_src!="" earliest=-1d@d latest=now by _time span=1d&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using earliest=-1d@d will take the search back to the beginning of yesterday (12:00am). Whereas using earliest=@d will take you to the beginning of the current day.&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 05:14:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Visualisation-Single-Value-with-Trendline/m-p/571463#M10387</guid>
      <dc:creator>Chef</dc:creator>
      <dc:date>2021-10-19T05:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: Visualisation : Single Value with Trendline</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Visualisation-Single-Value-with-Trendline/m-p/571583#M10398</link>
      <description>&lt;P&gt;Hi chef,&lt;BR /&gt;&lt;BR /&gt;Yeah I messed up with the timeframes &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Im using the comparison query and its working fine. Thankyou. This really helps me a lot. Thankyou again sir.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 05:37:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Visualisation-Single-Value-with-Trendline/m-p/571583#M10398</guid>
      <dc:creator>syazwani</dc:creator>
      <dc:date>2021-10-20T05:37:42Z</dc:date>
    </item>
  </channel>
</rss>

