<?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 do I plot a static value over time that is derived from the total count as an overlay on the count per day? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-plot-a-static-value-over-time-that-is-derived-from-the/m-p/246879#M73599</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[[search&amp;gt;]] earliest=-30d@d latest=@d 
| bucket _time span=1d | stats count as Volume by _time | rename _time As Date | eval Date = strftime(Date, "%a, %b %d")
| eventstats sum(Volume) as "Threshold Volume" | eval "Threshold Volume"='Threshold Volume' / 22| rename Volume as "Daily Volume"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 30 Sep 2015 15:57:03 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2015-09-30T15:57:03Z</dc:date>
    <item>
      <title>How do I plot a static value over time that is derived from the total count as an overlay on the count per day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-plot-a-static-value-over-time-that-is-derived-from-the/m-p/246877#M73597</link>
      <description>&lt;P&gt;I'd like to plot in a timechart the count of events over the last 30 days.&lt;BR /&gt;
In addition to this, I'd like another line which plots a line over the same period from a static value which is derived from the total of counts over the last month / 22.&lt;/P&gt;

&lt;P&gt;Whilst I have no problem displaying the count of events over 30 days, I'm unsure as to how to plot a static value (ie. calculate a static value and plot it against all times as a threshold).&lt;/P&gt;

&lt;P&gt;The following displays the average based on monthly count.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[[search&amp;gt;]] earliest=-30d@d latest=@d 
| bucket _time span=1d | stats count as Volume by _time | rename _time As Date | eval Date = strftime(Date, "%a, %b %d")
| eventstats avg(Volume) as "Threshold Volume" | rename Volume as "Daily Volume"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/691iBE4D986BB87414A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;However I actually want the 'Threshold Volume'  to instead be derived from Volume  / 22.   &lt;/P&gt;

&lt;P&gt;Thanks in advance for your help&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2015 06:56:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-plot-a-static-value-over-time-that-is-derived-from-the/m-p/246877#M73597</guid>
      <dc:creator>trem</dc:creator>
      <dc:date>2015-09-30T06:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I plot a static value over time that is derived from the total count as an overlay on the count per day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-plot-a-static-value-over-time-that-is-derived-from-the/m-p/246878#M73598</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;just add this to the end of your current search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval "new Threshhold" = 'Threshold Volume' / 22
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This simply calculates the value you want and puts it in a new field.&lt;BR /&gt;
If you want the total Volume / 22 instead of the avg Volume / 22 as Threshold you need to change the avg in your eventstats to sum.&lt;/P&gt;

&lt;P&gt;Greetings&lt;/P&gt;

&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2015 14:08:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-plot-a-static-value-over-time-that-is-derived-from-the/m-p/246878#M73598</guid>
      <dc:creator>tom_frotscher</dc:creator>
      <dc:date>2015-09-30T14:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I plot a static value over time that is derived from the total count as an overlay on the count per day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-plot-a-static-value-over-time-that-is-derived-from-the/m-p/246879#M73599</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[[search&amp;gt;]] earliest=-30d@d latest=@d 
| bucket _time span=1d | stats count as Volume by _time | rename _time As Date | eval Date = strftime(Date, "%a, %b %d")
| eventstats sum(Volume) as "Threshold Volume" | eval "Threshold Volume"='Threshold Volume' / 22| rename Volume as "Daily Volume"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Sep 2015 15:57:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-plot-a-static-value-over-time-that-is-derived-from-the/m-p/246879#M73599</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-09-30T15:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I plot a static value over time that is derived from the total count as an overlay on the count per day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-plot-a-static-value-over-time-that-is-derived-from-the/m-p/246880#M73600</link>
      <description>&lt;P&gt;Thanks.  That did the trick.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2015 22:38:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-plot-a-static-value-over-time-that-is-derived-from-the/m-p/246880#M73600</guid>
      <dc:creator>trem</dc:creator>
      <dc:date>2015-09-30T22:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I plot a static value over time that is derived from the total count as an overlay on the count per day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-plot-a-static-value-over-time-that-is-derived-from-the/m-p/246881#M73601</link>
      <description>&lt;P&gt;Thanks Tom.  Replacing avg() with sum() worked.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2015 22:39:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-plot-a-static-value-over-time-that-is-derived-from-the/m-p/246881#M73601</guid>
      <dc:creator>trem</dc:creator>
      <dc:date>2015-09-30T22:39:46Z</dc:date>
    </item>
  </channel>
</rss>

