<?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: get peak values from a timechart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/get-peak-values-from-a-timechart/m-p/216782#M63646</link>
    <description>&lt;P&gt;It's still not finding the peaks and adding them.  Looks like it's still just adding all the numbers.&lt;/P&gt;

&lt;P&gt;sourcetype="search" host=host1* || table idle |eventstats max(idle) as low | where (low/'idle') &amp;gt; 1 | stats sum(idle) as idle&lt;/P&gt;</description>
    <pubDate>Tue, 09 Aug 2016 15:21:43 GMT</pubDate>
    <dc:creator>chadman</dc:creator>
    <dc:date>2016-08-09T15:21:43Z</dc:date>
    <item>
      <title>get peak values from a timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-peak-values-from-a-timechart/m-p/216778#M63642</link>
      <description>&lt;P&gt;I have a chart and would like to get a total of all the peaks values on the chart.  This chart calculates idle time and goes up and then drops to 0 once the machine is no longer idle.  I would like to get all the peaks and add them together.  Is there a way to do this in a search?  Below is what my search looks like now.&lt;/P&gt;

&lt;P&gt;sourcetype="search" host=host1* | timechart avg(idle) as "Idle Time"&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 14:35:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-peak-values-from-a-timechart/m-p/216778#M63642</guid>
      <dc:creator>chadman</dc:creator>
      <dc:date>2016-08-09T14:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: get peak values from a timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-peak-values-from-a-timechart/m-p/216779#M63643</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="search" host=host1* | timechart avg(idle) as "Idle Time" | where "Idle Time"&amp;gt;0 | stats sum("Idle Time") as Peaks
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Aug 2016 14:39:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-peak-values-from-a-timechart/m-p/216779#M63643</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-09T14:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: get peak values from a timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-peak-values-from-a-timechart/m-p/216780#M63644</link>
      <description>&lt;P&gt;That seems to be adding all the times, not just the peaks.  So if my values were:&lt;/P&gt;

&lt;P&gt;1,2,3,4,0,0,1,2,3,0&lt;BR /&gt;
I would see 16 with your search.  I would like to see 7.  That would get the sum of 4 and 3.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 14:48:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-peak-values-from-a-timechart/m-p/216780#M63644</guid>
      <dc:creator>chadman</dc:creator>
      <dc:date>2016-08-09T14:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: get peak values from a timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-peak-values-from-a-timechart/m-p/216781#M63645</link>
      <description>&lt;P&gt;Try this then. You can adjust the last segment to what you would consider acceptable peak. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="search" host=host1* | timechart avg(idle) as "Idle Time" | evenstats min("Idle Time") as low | where (low/"Idle Time")&amp;gt;.5 | stats sum("Idle Time") as IdleTime
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Aug 2016 14:54:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-peak-values-from-a-timechart/m-p/216781#M63645</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-09T14:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: get peak values from a timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-peak-values-from-a-timechart/m-p/216782#M63646</link>
      <description>&lt;P&gt;It's still not finding the peaks and adding them.  Looks like it's still just adding all the numbers.&lt;/P&gt;

&lt;P&gt;sourcetype="search" host=host1* || table idle |eventstats max(idle) as low | where (low/'idle') &amp;gt; 1 | stats sum(idle) as idle&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 15:21:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-peak-values-from-a-timechart/m-p/216782#M63646</guid>
      <dc:creator>chadman</dc:creator>
      <dc:date>2016-08-09T15:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: get peak values from a timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-peak-values-from-a-timechart/m-p/216783#M63647</link>
      <description>&lt;P&gt;Here are the values I get when I search sourcetype="search1" host=host1  | table idle&lt;BR /&gt;
0&lt;BR /&gt;&lt;BR /&gt;
0&lt;BR /&gt;&lt;BR /&gt;
0&lt;BR /&gt;&lt;BR /&gt;
0&lt;BR /&gt;&lt;BR /&gt;
0&lt;BR /&gt;&lt;BR /&gt;
0&lt;BR /&gt;&lt;BR /&gt;
4&lt;BR /&gt;&lt;BR /&gt;
3&lt;BR /&gt;&lt;BR /&gt;
2&lt;BR /&gt;&lt;BR /&gt;
1&lt;BR /&gt;&lt;BR /&gt;
0&lt;BR /&gt;&lt;BR /&gt;
8&lt;BR /&gt;&lt;BR /&gt;
7&lt;BR /&gt;&lt;BR /&gt;
6&lt;BR /&gt;&lt;BR /&gt;
5&lt;BR /&gt;&lt;BR /&gt;
4&lt;BR /&gt;&lt;BR /&gt;
3&lt;BR /&gt;&lt;BR /&gt;
2&lt;BR /&gt;&lt;BR /&gt;
1&lt;BR /&gt;&lt;BR /&gt;
0&lt;/P&gt;

&lt;P&gt;So with this search I would like to see the number 12 that adds the 2 peaks found of 8 and 4.  I can't figure out to just display those peaks.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 15:32:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-peak-values-from-a-timechart/m-p/216783#M63647</guid>
      <dc:creator>chadman</dc:creator>
      <dc:date>2016-08-09T15:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: get peak values from a timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-peak-values-from-a-timechart/m-p/216784#M63648</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="search" host=host1* | timechart avg(idle) as "Idle Time" | eval sno=if('Idle Time'=0,1,0) | accum sno
| eventstats max("Idle Time") as max by sno | where 'Idle Time'=max | table _time "Idle Time"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Aug 2016 15:49:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-peak-values-from-a-timechart/m-p/216784#M63648</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-09T15:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: get peak values from a timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-peak-values-from-a-timechart/m-p/216785#M63649</link>
      <description>&lt;P&gt;That did it!  Thanks so much, I never would have figured that out.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2016 16:52:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-peak-values-from-a-timechart/m-p/216785#M63649</guid>
      <dc:creator>chadman</dc:creator>
      <dc:date>2016-08-09T16:52:49Z</dc:date>
    </item>
  </channel>
</rss>

