<?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: Display peak usage over time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Display-peak-usage-over-time/m-p/36162#M8039</link>
    <description>&lt;P&gt;Yip.&lt;/P&gt;

&lt;P&gt;If you want the values in a table, here's an example :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-7d@d
| bin _time span=5m
| stats count as eps by _time 
| eval day=_time
| bin day span=1d
| eventstats max(eps) as peak_eps by day
| where eps==peak_eps
| fields - day eps
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want to plot this, add :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval date_string=strftime(_time,"%d/%m/%y %H:%M:00")
| chart first(eps) by date_string
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There's no way to display 5 minute chunks over 30 days, so you have to resort to using chart instead of timechart.&lt;/P&gt;

&lt;P&gt;If the date strings on the X axis look ugly, and this is going in a dashboard, I answered a question recently about word-wrapping / truncation for axis labels.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Feb 2013 08:18:57 GMT</pubDate>
    <dc:creator>jonuwz</dc:creator>
    <dc:date>2013-02-19T08:18:57Z</dc:date>
    <item>
      <title>Display peak usage over time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-peak-usage-over-time/m-p/36161#M8038</link>
      <description>&lt;P&gt;Hi &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;We are using Splunk 5.0.2 and have a requirement to show peak bandwidth usage over time.&lt;/P&gt;

&lt;P&gt;Here is the search that we are using over the Last 30 days:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=mediacap ( hostname="cha-cdn6506-*" OR hostname="cht-cdn6506-*" ) ( metric="ifInOctets_Port-channel10" OR metric="ifInOctets_Port-channel11" ) 
| eval metric=hostname.":".metric 
| streamstats current=t global=f window=2 earliest(value) as curr latest(value) as next by metric 
| eval delta=next-curr 
| eval inkilobits=(delta*8/1000/1000/1000) 
| timechart span=5m per_second(inkilobits) as in_kbps useother=f limit=0 by metric 
| addtotals *Octets* 
| fields + Total 
| timechart span=1d max(Total) as Usage
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It shows a line graph of peak usage with a span of 1 day between data points, however splunk displays those data points snapped to midnight (ie. beginning of each day).&lt;/P&gt;

&lt;P&gt;Is it possible to show the actual time in a day or hour that a peak occurred? Could it be put in a table and/or on the chart?&lt;/P&gt;

&lt;P&gt;Thanks in advance,&lt;/P&gt;

&lt;P&gt;Luke &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2013 04:55:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-peak-usage-over-time/m-p/36161#M8038</guid>
      <dc:creator>lukeh</dc:creator>
      <dc:date>2013-02-19T04:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Display peak usage over time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-peak-usage-over-time/m-p/36162#M8039</link>
      <description>&lt;P&gt;Yip.&lt;/P&gt;

&lt;P&gt;If you want the values in a table, here's an example :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-7d@d
| bin _time span=5m
| stats count as eps by _time 
| eval day=_time
| bin day span=1d
| eventstats max(eps) as peak_eps by day
| where eps==peak_eps
| fields - day eps
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want to plot this, add :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval date_string=strftime(_time,"%d/%m/%y %H:%M:00")
| chart first(eps) by date_string
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There's no way to display 5 minute chunks over 30 days, so you have to resort to using chart instead of timechart.&lt;/P&gt;

&lt;P&gt;If the date strings on the X axis look ugly, and this is going in a dashboard, I answered a question recently about word-wrapping / truncation for axis labels.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2013 08:18:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-peak-usage-over-time/m-p/36162#M8039</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2013-02-19T08:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: Display peak usage over time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-peak-usage-over-time/m-p/36163#M8040</link>
      <description>&lt;P&gt;Awesome! Thanks John!!!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2013 23:55:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-peak-usage-over-time/m-p/36163#M8040</guid>
      <dc:creator>lukeh</dc:creator>
      <dc:date>2013-02-19T23:55:27Z</dc:date>
    </item>
  </channel>
</rss>

