<?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 How can i create a dashboard with avg cpu usage over 30 days, broken by timeframe in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-i-create-a-dashboard-with-avg-cpu-usage-over-30-days/m-p/329758#M39848</link>
    <description>&lt;P&gt;I have dashboard with avg cpu usage 30 days but now i want to break it with timeframe like:&lt;BR /&gt;
• One window for 12am-8am, one window from 8am-4pm, one window from 4pm-12am&lt;/P&gt;</description>
    <pubDate>Mon, 05 Mar 2018 11:09:09 GMT</pubDate>
    <dc:creator>shreyasathavale</dc:creator>
    <dc:date>2018-03-05T11:09:09Z</dc:date>
    <item>
      <title>How can i create a dashboard with avg cpu usage over 30 days, broken by timeframe</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-i-create-a-dashboard-with-avg-cpu-usage-over-30-days/m-p/329758#M39848</link>
      <description>&lt;P&gt;I have dashboard with avg cpu usage 30 days but now i want to break it with timeframe like:&lt;BR /&gt;
• One window for 12am-8am, one window from 8am-4pm, one window from 4pm-12am&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 11:09:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-i-create-a-dashboard-with-avg-cpu-usage-over-30-days/m-p/329758#M39848</guid>
      <dc:creator>shreyasathavale</dc:creator>
      <dc:date>2018-03-05T11:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can i create a dashboard with avg cpu usage over 30 days, broken by timeframe</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-i-create-a-dashboard-with-avg-cpu-usage-over-30-days/m-p/329759#M39849</link>
      <description>&lt;P&gt;can you provide search query?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 11:22:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-i-create-a-dashboard-with-avg-cpu-usage-over-30-days/m-p/329759#M39849</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-03-05T11:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: How can i create a dashboard with avg cpu usage over 30 days, broken by timeframe</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-i-create-a-dashboard-with-avg-cpu-usage-over-30-days/m-p/329760#M39850</link>
      <description>&lt;P&gt;index=abc role=xyz sourcetype=cpu cpu=all|eval pctBusy=100-pctIdle|chart avg(pctBusy) by host|eval AvgCPU=round('avg(pctBusy)',2)|rename AvgCPU As "Average CPU" |fields host,"Average CPU"|sort by host&lt;/P&gt;

&lt;P&gt;I have set earliest=-30d@d latest=now &lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 11:27:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-i-create-a-dashboard-with-avg-cpu-usage-over-30-days/m-p/329760#M39850</guid>
      <dc:creator>shreyasathavale</dc:creator>
      <dc:date>2018-03-05T11:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can i create a dashboard with avg cpu usage over 30 days, broken by timeframe</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-i-create-a-dashboard-with-avg-cpu-usage-over-30-days/m-p/329761#M39851</link>
      <description>&lt;P&gt;you can try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=os sourcetype=cpu cpu=all 
| eval pctBusy=100-pctIdle 
| eval date_hour=strftime(_time,"%H") 
| eval date=case(date_hour&amp;gt;=0 AND date_hour&amp;lt;8,"12am-8am",date_hour&amp;gt;=8 AND date_hour&amp;lt;16,"8am-4pm",date_hour&amp;gt;=16 AND date_hour&amp;lt;24,"4pm-12am") 
| chart avg(pctBusy) as avg over host by date 
| foreach 12am-8am 8am-4pm 4pm-12am 
    [ eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=round('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;')] 
| sort by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 11:46:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-i-create-a-dashboard-with-avg-cpu-usage-over-30-days/m-p/329761#M39851</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-03-05T11:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: How can i create a dashboard with avg cpu usage over 30 days, broken by timeframe</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-i-create-a-dashboard-with-avg-cpu-usage-over-30-days/m-p/329762#M39852</link>
      <description>&lt;P&gt;Hey shreyasathavale,&lt;/P&gt;

&lt;P&gt;You can try this query below:&lt;/P&gt;

&lt;P&gt;index=abc role=xyz sourcetype=cpu cpu=all|eval pctBusy=100-pctIdle|eval time=case(date_hour&amp;gt;0 AND date_hour&amp;lt;8,"slot1",date_hour&amp;gt;8 AND date_hour&amp;lt;16,"slot2",date_hour&amp;gt;16 AND date_hour&amp;lt;24,"slot3")|chart avg(pctBusy) by host,time|eval AvgCPU=round('avg(pctBusy)',2)|rename AvgCPU As "Average CPU" |fields host,"Average CPU","time"|sort by host &lt;/P&gt;

&lt;P&gt;Hope this helps!!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:14:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-i-create-a-dashboard-with-avg-cpu-usage-over-30-days/m-p/329762#M39852</guid>
      <dc:creator>deepashri_123</dc:creator>
      <dc:date>2020-09-29T18:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: How can i create a dashboard with avg cpu usage over 30 days, broken by timeframe</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-i-create-a-dashboard-with-avg-cpu-usage-over-30-days/m-p/329763#M39853</link>
      <description>&lt;P&gt;This did not provide any result sadly.. but mayurr98's answer worked. Thanks again!!&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 12:54:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-i-create-a-dashboard-with-avg-cpu-usage-over-30-days/m-p/329763#M39853</guid>
      <dc:creator>shreyasathavale</dc:creator>
      <dc:date>2018-03-05T12:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: How can i create a dashboard with avg cpu usage over 30 days, broken by timeframe</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-i-create-a-dashboard-with-avg-cpu-usage-over-30-days/m-p/329764#M39854</link>
      <description>&lt;P&gt;Thanks a lot mayurr98 !!!&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 12:54:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-i-create-a-dashboard-with-avg-cpu-usage-over-30-days/m-p/329764#M39854</guid>
      <dc:creator>shreyasathavale</dc:creator>
      <dc:date>2018-03-05T12:54:42Z</dc:date>
    </item>
  </channel>
</rss>

