<?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: Set an alert for 3 hosts when their CPU Utilization exceeds 80% in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541905#M153464</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I mean memory utilization&lt;/P&gt;</description>
    <pubDate>Tue, 02 Mar 2021 08:30:57 GMT</pubDate>
    <dc:creator>hishamjan</dc:creator>
    <dc:date>2021-03-02T08:30:57Z</dc:date>
    <item>
      <title>Set an alert for 3 hosts when their CPU Utilization exceeds 80%</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541884#M153451</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have Splunk Add-on for Unix and Linux installed on my 3 hosts sending data to an Indexer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a dashboard of CPU utilization of each host using the &lt;STRONG&gt;vmstat&lt;/STRONG&gt; command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I would like to create an alert that will send an alert message every time any of those three forwarders exceed 80% of CPU utilization.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The query for CPU utilization is as follows:&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;&lt;LI-CODE lang="markup"&gt;index=os  sourcetype=df  
            | dedup host 
            | multikv 
            | table host Filesystem Size Used Avail UsePct&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way I can achieve this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;If so, I'd like to know and edit my search above to cater for my needs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance to anyone willing to help.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 08:31:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541884#M153451</guid>
      <dc:creator>hishamjan</dc:creator>
      <dc:date>2021-03-02T08:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set an alert for 3 hosts when their CPU Utilization exceeds 80%</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541892#M153456</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228379"&gt;@hishamjan&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you have to use the same search to idewntify the threshold value, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;source="vmstat"
| dedup host 
| eval host=upper(host), FreeGBs=FreeMBytes/1024, TotalGBs=TotalMBytes/1024, UsedGBs=UsedMBytes/1024
| eval perc=UsedGBs/TotalMBytes*100
| where perc&amp;gt;80
| table host TotalGBs UsedGBs FreeGBs memFreePct memUsedPct
| sort host&lt;/LI-CODE&gt;&lt;P&gt;The you can save this search as an alert.&lt;/P&gt;&lt;P&gt;Only one additional hint: in the main search use always the index, the search will be quicker!&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 08:02:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541892#M153456</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-03-02T08:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set an alert for 3 hosts when their CPU Utilization exceeds 80%</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541893#M153457</link>
      <description>&lt;P&gt;Is the stat already extracted into a field in vmstat? If not, is it contained in the _raw event? What does this look like?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 08:03:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541893#M153457</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-03-02T08:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set an alert for 3 hosts when their CPU Utilization exceeds 80%</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541897#M153458</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply but it shows no results found when I ran your query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way, by chance, to run timechart instead of a table?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 08:13:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541897#M153458</guid>
      <dc:creator>hishamjan</dc:creator>
      <dc:date>2021-03-02T08:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set an alert for 3 hosts when their CPU Utilization exceeds 80%</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541899#M153460</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;No, vmstat is a sourcetype that I explicitly defined in the ~/local/inputs.conf file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 08:14:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541899#M153460</guid>
      <dc:creator>hishamjan</dc:creator>
      <dc:date>2021-03-02T08:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set an alert for 3 hosts when their CPU Utilization exceeds 80%</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541902#M153462</link>
      <description>&lt;P&gt;By CPU utilisation, do you mean memory utilisation and not processor utilisation?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 08:19:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541902#M153462</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-03-02T08:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set an alert for 3 hosts when their CPU Utilization exceeds 80%</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541905#M153464</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I mean memory utilization&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 08:30:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541905#M153464</guid>
      <dc:creator>hishamjan</dc:creator>
      <dc:date>2021-03-02T08:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Set an alert for 3 hosts when their CPU Utilization exceeds 80%</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541906#M153465</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228379"&gt;@hishamjan&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;at first find the correct frequency and timeframe to run your search, to be sure to take the data.&lt;/P&gt;&lt;P&gt;Then, to check your alert, try the search with a different threshold and see if it matches the condition.&lt;/P&gt;&lt;P&gt;At least, don't use the condition and see what are the results, to analyze them and eventually correct the search.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 08:32:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541906#M153465</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-03-02T08:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Set an alert for 3 hosts when their CPU Utilization exceeds 80%</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541908#M153466</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm sorry for the mistake, the code sample I attached was from another post.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The one I'm looking for is attached below:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=os  sourcetype=df  
            | dedup host 
            | multikv 
            | table host Filesystem Size Used Avail UsePct&lt;/LI-CODE&gt;&lt;P&gt;I need to have an alert attached to this query when the CPU utilization exceeds 80%.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sorry if I caused any inconvenience.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 08:33:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541908#M153466</guid>
      <dc:creator>hishamjan</dc:creator>
      <dc:date>2021-03-02T08:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set an alert for 3 hosts when their CPU Utilization exceeds 80%</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541919#M153469</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228379"&gt;@hishamjan&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the best approach is to install the Splunk App for Linux and Unix (&lt;A href="https://splunkbase.splunk.com/app/273/" target="_blank"&gt;https://splunkbase.splunk.com/app/273/&lt;/A&gt;) where you can find all the searches you need.&lt;/P&gt;&lt;P&gt;Anyway, try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=os
| multikv 
| stats max(pctCPU) as maxCPU values(Size) AS Size max(Used) AS used max(Avail) AS Avail BY host Filesystem 
| where maxCPU&amp;gt;80&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 09:24:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Set-an-alert-for-3-hosts-when-their-CPU-Utilization-exceeds-80/m-p/541919#M153469</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-03-02T09:24:56Z</dc:date>
    </item>
  </channel>
</rss>

