<?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 averaging the CPU values from the recent six events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/averaging-the-CPU-values-from-the-recent-six-events/m-p/652302#M225455</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm attempting to calculate the average of the last six CPU event values. If the average of those six events is greater than 95%, an alert must be sent. I basically tried the below query, but it produced nothing. Can someone help?&lt;/P&gt;&lt;P&gt;index=* sourcetype=cpu CPU=all host=* earliest=-35m | rename "%_Idle_Time" as Percent_Idle_Time | eval CpuUsage=coalesce(100-Percent_Idle_Time,100-PercentIdleTime) | streamstats count by host | where count&amp;lt;=6 | stats avg(values(CpuUsage)) as "Average of CpuUsage last 6 intervals(5mins range)" by host&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Satheesh&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jul 2023 04:15:37 GMT</pubDate>
    <dc:creator>Satheesh_red</dc:creator>
    <dc:date>2023-07-28T04:15:37Z</dc:date>
    <item>
      <title>averaging the CPU values from the recent six events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/averaging-the-CPU-values-from-the-recent-six-events/m-p/652302#M225455</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm attempting to calculate the average of the last six CPU event values. If the average of those six events is greater than 95%, an alert must be sent. I basically tried the below query, but it produced nothing. Can someone help?&lt;/P&gt;&lt;P&gt;index=* sourcetype=cpu CPU=all host=* earliest=-35m | rename "%_Idle_Time" as Percent_Idle_Time | eval CpuUsage=coalesce(100-Percent_Idle_Time,100-PercentIdleTime) | streamstats count by host | where count&amp;lt;=6 | stats avg(values(CpuUsage)) as "Average of CpuUsage last 6 intervals(5mins range)" by host&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Satheesh&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2023 04:15:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/averaging-the-CPU-values-from-the-recent-six-events/m-p/652302#M225455</guid>
      <dc:creator>Satheesh_red</dc:creator>
      <dc:date>2023-07-28T04:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: averaging the CPU values from the recent six events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/averaging-the-CPU-values-from-the-recent-six-events/m-p/652306#M225457</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats avg(CpuUsage) as "Average of CpuUsage last 6 intervals(5mins range)" by host&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 28 Jul 2023 05:16:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/averaging-the-CPU-values-from-the-recent-six-events/m-p/652306#M225457</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-07-28T05:16:51Z</dc:date>
    </item>
  </channel>
</rss>

