<?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: Timechart minimum values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288167#M87246</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;index=blahalarm STATUS=armed OR STATUS=readyArmed|timechart span=1hr sum(field2) as sum|eventstats max(sum) as max min(sum) as min avg(sum) as avg
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;based on previous comments, is something like this what you're needing?&lt;/P&gt;</description>
    <pubDate>Thu, 15 Feb 2018 19:55:20 GMT</pubDate>
    <dc:creator>cmerriman</dc:creator>
    <dc:date>2018-02-15T19:55:20Z</dc:date>
    <item>
      <title>Timechart minimum values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288159#M87238</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have this data this is retrieved once per hour (more or less on the hour) for the past 7 days.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;readyArmed,32335,2018-02-15 12:01:38.646138 -5:00
armed,4743,2018-02-15 12:01:38.646138 -5:00
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The first field is the armed state and the second field is the number of customers in that state at that time, the third field is the timestamp.&lt;/P&gt;

&lt;P&gt;I've created a simple timechart graph showing the pattern and it looks like this.  What I'd like to do is create a similar timechart graph that shows the minimum, maximum and averages of the same data over time.&lt;/P&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/4389i1A24AD5B64E45A44/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 18:45:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288159#M87238</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2018-02-15T18:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart minimum values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288160#M87239</link>
      <description>&lt;P&gt;Oh sorry, should have included my query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-100hr index=blahalarm STATUS=armed OR STATUS=readyArmed|timechart span=1hr sum(field2) as ar
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Feb 2018 18:47:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288160#M87239</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2018-02-15T18:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart minimum values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288161#M87240</link>
      <description>&lt;P&gt;If you just want the min/max/avg over the same period that your sum is over, this should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-100hr index=blahalarm STATUS=armed OR STATUS=readyArmed|timechart span=1hr sum(field2) as sum, avg(field2) AS avg, min(field2) AS min, max(field2) AS max
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Feb 2018 18:52:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288161#M87240</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-02-15T18:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart minimum values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288162#M87241</link>
      <description>&lt;P&gt;Hi Michahkemp,&lt;/P&gt;

&lt;P&gt;Thanks!  its close but not quite and I wasn't clear so lemme try again.&lt;/P&gt;

&lt;P&gt;I would like the sum of field 2 min, max and avg not just field2&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 18:58:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288162#M87241</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2018-02-15T18:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart minimum values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288163#M87242</link>
      <description>&lt;P&gt;are you wanting it by state? or are there other fields that you want min, max, avg of?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 19:14:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288163#M87242</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2018-02-15T19:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart minimum values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288164#M87243</link>
      <description>&lt;P&gt;State can be armed or readyArmed, for this report they are essentially the same thing which is why I am summing the two values into one.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 19:23:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288164#M87243</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2018-02-15T19:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart minimum values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288165#M87244</link>
      <description>&lt;P&gt;Once summed I need to represent the sum, the avg of the sum, the minimum of the sum, and the maximum of the sum&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 19:26:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288165#M87244</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2018-02-15T19:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart minimum values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288166#M87245</link>
      <description>&lt;P&gt;There are no other values in the data (I tried to keep in simple) &lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 19:27:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288166#M87245</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2018-02-15T19:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart minimum values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288167#M87246</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=blahalarm STATUS=armed OR STATUS=readyArmed|timechart span=1hr sum(field2) as sum|eventstats max(sum) as max min(sum) as min avg(sum) as avg
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;based on previous comments, is something like this what you're needing?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 19:55:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288167#M87246</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2018-02-15T19:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart minimum values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288168#M87247</link>
      <description>&lt;P&gt;Hi cmerriman,&lt;/P&gt;

&lt;P&gt;Interesting idea doing the post processing with eventstats.  I gave it a shot and here is what happened&lt;/P&gt;

&lt;P&gt;Time period X&lt;/P&gt;

&lt;P&gt;Sum Value=37604 (this is good)&lt;BR /&gt;
Avg Value=41271 (looks good)&lt;BR /&gt;
Max Value=60718 (looks good)&lt;BR /&gt;
Min Value=25947 (looks good)&lt;/P&gt;

&lt;P&gt;Here is where the trouble shows up&lt;/P&gt;

&lt;P&gt;Time period Y&lt;/P&gt;

&lt;P&gt;Sum Value=37418 (this is good)&lt;BR /&gt;
Avg Value=41271 (identical to time period X - possible but very unlikely)&lt;BR /&gt;
Max Value=60718 (identical to time period X - possible but very unlikely)&lt;BR /&gt;
Min Value=25947 (identical to time period X - possible but very unlikely)&lt;/P&gt;

&lt;P&gt;Time period Z&lt;/P&gt;

&lt;P&gt;Sum Value=36751 (this is good)&lt;BR /&gt;
Avg Value=41271 (identical to time period X &amp;amp; Y - possible but extremely unlikely)&lt;BR /&gt;
Max Value=60718 (identical to time period X &amp;amp; Y  - possible but extremely unlikely)&lt;BR /&gt;
Min Value=25947 (identical to time period X &amp;amp; Y  - possible but extremely unlikely)&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 20:03:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288168#M87247</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2018-02-15T20:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart minimum values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288169#M87248</link>
      <description>&lt;P&gt;can you give a sample output of what the data should look like? I thought you meant the overall max/min/avg of sum when you stated you needed to represent the avg of the sum, min of the sum, and max of the sum. i suppose you could use &lt;CODE&gt;streamstats&lt;/CODE&gt; instead of &lt;CODE&gt;eventstats&lt;/CODE&gt;, and that would be a moving min/max/avg. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/streamstats"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/streamstats&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 20:36:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-minimum-values/m-p/288169#M87248</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2018-02-15T20:36:18Z</dc:date>
    </item>
  </channel>
</rss>

