<?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: Query to setup alert if the diskspace goes over 70%? in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329495#M3008</link>
    <description>&lt;P&gt;when i take the line 4 out, i  still do not see any results&lt;/P&gt;

&lt;P&gt;index=YouShouldAlwaysSpecifyAnIndex sourcetype="Perfmon:Free Disk Space" counter="% Free Space" host=tableaufqt host=TABLEAU&lt;BR /&gt;
 | timechart avg(Value) AS PctFree BY host&lt;BR /&gt;
 | eval PctUsed = 100 - PctFree&lt;/P&gt;</description>
    <pubDate>Mon, 11 Sep 2017 18:40:34 GMT</pubDate>
    <dc:creator>shakeel253</dc:creator>
    <dc:date>2017-09-11T18:40:34Z</dc:date>
    <item>
      <title>Query to setup alert if the diskspace goes over 70%?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329483#M2996</link>
      <description>&lt;P&gt;Below are the Host and Source type, I am trying to setup an alert if the diskspace goes over 70%. can some help?&lt;/P&gt;

&lt;P&gt;host=tableau sourcetype="Perfmon:Free Disk Space"&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 12:45:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329483#M2996</guid>
      <dc:creator>shakeel253</dc:creator>
      <dc:date>2017-09-11T12:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Query to setup alert if the diskspace goes over 70%?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329484#M2997</link>
      <description>&lt;P&gt;I think I had answered something on similar lines in one of your previous questions: &lt;A href="https://answers.splunk.com/answers/568907/visual-chart-for-how-much-free-disk-space-is-avail.html#answer-568941"&gt;https://answers.splunk.com/answers/568907/visual-chart-for-how-much-free-disk-space-is-avail.html#answer-568941&lt;/A&gt;. Please try the following query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=tableau sourcetype="Perfmon:Free Disk Space" object="LogicalDisk" counter="% Free Space" 
| head 1
| eval Used_Percent=round(100-Value,1)
| search Used_Percent&amp;gt;70
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Sep 2017 12:54:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329484#M2997</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-09-11T12:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: Query to setup alert if the diskspace goes over 70%?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329485#M2998</link>
      <description>&lt;P&gt;You need more than just host and sourcetype.  You also need a field showing how much diskspace is in use.  Do you have one of those?  If so, a sample query might look like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=tableau sourcetype="Perfmon:Free Disk Space" spaceUsed=* | where spaceUsed&amp;gt;70 | table host spaceUsed
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Once you have the query returning the desired results, schedule it to run at an appropriate interval (hourly, perhaps) and send an alert if the number of results is not zero.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 13:07:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329485#M2998</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-09-11T13:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Query to setup alert if the diskspace goes over 70%?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329486#M2999</link>
      <description>&lt;P&gt;Richgalloway i have added all the field but still not getting a result with the above mentioned query. Most probably because i do not see a spaceused field. Do you know whats missing?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;date_hour   24  81.8%   Number
date_mday   4   81.8%   Number
date_minute 60  81.8%   Number
date_month  1   81.8%   String
date_second 60  81.79%  Number
date_wday   4   81.8%   String
date_year   1   81.8%   Number
date_zone   3   81.8%   Number
eventtype   4   94.36%  String
host    2   100%    String
index   1   100%    String
linecount   27  100%    Number
punct   &amp;gt;100    100%    String
source  &amp;gt;100    100%    String
sourcetype  55  100%    String
splunk_server   1   100%    String
timeendpos  34  81.8%   Number
timestartpos    16  81.8%   Number
unix_category   1   100%    String
unix_group  1   100%    String
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Sep 2017 14:00:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329486#M2999</guid>
      <dc:creator>shakeel253</dc:creator>
      <dc:date>2017-09-11T14:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Query to setup alert if the diskspace goes over 70%?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329487#M3000</link>
      <description>&lt;P&gt;Hey NiketNilay , your previous query was on point on giving me the visual dashboard that i was looking for, but now i have to setup an alert if the diskspace goes pass 70% or above.  The above mentioned query does not give me any results&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 14:08:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329487#M3000</guid>
      <dc:creator>shakeel253</dc:creator>
      <dc:date>2017-09-11T14:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Query to setup alert if the diskspace goes over 70%?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329488#M3001</link>
      <description>&lt;P&gt;hello Rich,&lt;/P&gt;

&lt;P&gt;I am not getting results with the above mentioned query. One possible answer is that i do not see spaceused field, nor  do i have df. &lt;/P&gt;

&lt;P&gt;This query gives me a result&lt;BR /&gt;
host=tableaufqt sourcetype="Perfmon:Free Disk Space" counter="% Free Space" | timechart avg(Value) as PercentFree by host&lt;/P&gt;

&lt;P&gt;2017-09-10 14:30:00 48.89175133278226.&lt;/P&gt;

&lt;P&gt;how can i use this query to setup alert when diskspace goes pass 70%&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 14:27:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329488#M3001</guid>
      <dc:creator>shakeel253</dc:creator>
      <dc:date>2017-09-11T14:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: Query to setup alert if the diskspace goes over 70%?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329489#M3002</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=YouShouldAlwaysSpecifyAnIndex sourcetype="Perfmon:Free Disk Space" counter="% Free Space" host=tableaufqt
| chart avg(Value) AS PctFree BY host
| eval PctUsed = 100 - PctFree
| search PctUsed &amp;gt; 70
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then save this as an alert with a trigger of &lt;CODE&gt;Number of events&lt;/CODE&gt; and &lt;CODE&gt;is greater than 0&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 16:12:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329489#M3002</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-09-11T16:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Query to setup alert if the diskspace goes over 70%?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329490#M3003</link>
      <description>&lt;P&gt;hey Woodcock, thank you for the above mentioned query, when i ran this query, i did not get a result. The reason i didnt get a result is because hard disk is below 70. To check if the query work, i changed the percentage to 20%, i shouldve gotten something but no result to display.&lt;/P&gt;

&lt;P&gt;Is it something that needs to be changed within the query or am i doing something wrong&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 16:39:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329490#M3003</guid>
      <dc:creator>shakeel253</dc:creator>
      <dc:date>2017-09-11T16:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Query to setup alert if the diskspace goes over 70%?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329491#M3004</link>
      <description>&lt;P&gt;What is the result you get when you run the following query? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=tableau sourcetype="Perfmon:Free Disk Space" object="LogicalDisk" counter="% Free Space" 
| head 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you do not get any results, then please provide the correct base search as @woodcock has mentioned you should also include index name in your search. &lt;STRONG&gt;If Splunk admins have not set a default index and you are not allowed to search without specifying the index, your query itself might not work.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;You can directly set alert on &lt;CODE&gt;% Free Space&lt;/CODE&gt; for alert also i.e. &lt;CODE&gt;alert for free space less than 30%&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; host=tableau sourcetype="Perfmon:Free Disk Space" object="LogicalDisk" counter="% Free Space" 
| head 1
| search Value&amp;lt;30
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Sep 2017 16:54:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329491#M3004</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-09-11T16:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Query to setup alert if the diskspace goes over 70%?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329492#M3005</link>
      <description>&lt;P&gt;when i run this query&lt;BR /&gt;
host=tableau sourcetype="Perfmon:Free Disk Space" object="LogicalDisk" counter="% Free Space" &lt;BR /&gt;
 | head 1&lt;/P&gt;

&lt;P&gt;i get &lt;/P&gt;

&lt;P&gt;9/11/17&lt;BR /&gt;
4:34:49.000 PM&lt;BR /&gt;&lt;BR /&gt;
09/11/2017 12:34:49.728 -0400&lt;BR /&gt;
collection="Free Disk Space"&lt;BR /&gt;
object=LogicalDisk&lt;BR /&gt;
counter="% Free Space"&lt;BR /&gt;
instance=_Total&lt;BR /&gt;
Value=80.31558269365843&lt;BR /&gt;
Collapse&lt;BR /&gt;
host =  TABLEAU source =    Perfmon:Free Disk Space sourcetype =    Perfmon:Free Disk Space&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 17:13:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329492#M3005</guid>
      <dc:creator>shakeel253</dc:creator>
      <dc:date>2017-09-11T17:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Query to setup alert if the diskspace goes over 70%?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329493#M3006</link>
      <description>&lt;P&gt;hey Niket, &lt;BR /&gt;
i got below results when i ran this query&lt;BR /&gt;
host=tableau sourcetype="Perfmon:Free Disk Space" object="LogicalDisk" counter="% Free Space" &lt;BR /&gt;
 | head 1&lt;/P&gt;

&lt;P&gt;9/11/17&lt;BR /&gt;
5:34:49.000 PM&lt;BR /&gt;&lt;BR /&gt;
09/11/2017 13:34:49.727 -0400&lt;BR /&gt;
collection="Free Disk Space"&lt;BR /&gt;
object=LogicalDisk&lt;BR /&gt;
counter="% Free Space"&lt;BR /&gt;
instance=_Total&lt;BR /&gt;
Value=80.31195185254278&lt;BR /&gt;
host =  TABLEAU index = main linecount =    6 source =  Perfmon:Free Disk Space splunk_server = ip-xx-xxx-x-xxx unix_category = all_hosts unix_group =  default&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:41:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329493#M3006</guid>
      <dc:creator>shakeel253</dc:creator>
      <dc:date>2020-09-29T15:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Query to setup alert if the diskspace goes over 70%?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329494#M3007</link>
      <description>&lt;P&gt;If you get rid of the last line, do you get any results there?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 18:32:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329494#M3007</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-09-11T18:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Query to setup alert if the diskspace goes over 70%?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329495#M3008</link>
      <description>&lt;P&gt;when i take the line 4 out, i  still do not see any results&lt;/P&gt;

&lt;P&gt;index=YouShouldAlwaysSpecifyAnIndex sourcetype="Perfmon:Free Disk Space" counter="% Free Space" host=tableaufqt host=TABLEAU&lt;BR /&gt;
 | timechart avg(Value) AS PctFree BY host&lt;BR /&gt;
 | eval PctUsed = 100 - PctFree&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 18:40:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329495#M3008</guid>
      <dc:creator>shakeel253</dc:creator>
      <dc:date>2017-09-11T18:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Query to setup alert if the diskspace goes over 70%?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329496#M3009</link>
      <description>&lt;P&gt;The spaceUsed field in my query is a pseudo-field.  You need to replace it with the correct field from your data.  Sorry for not mentioning that in my answer.&lt;BR /&gt;
Searching for 'index=host=tableau sourcetype="Perfmon:Free Disk Space"' will return the available fields.  If you don't see anything appropriate then you may need to extract additional fields.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 20:47:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329496#M3009</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-09-11T20:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Query to setup alert if the diskspace goes over 70%?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329497#M3010</link>
      <description>&lt;P&gt;You have to substitute in your "real" stuff for my "fake" placeholders stuff (e.g. &lt;CODE&gt;YouShouldAlwaysSpecifyAnIndex&lt;/CODE&gt;) and anything else that we guessed/assumed.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 00:26:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329497#M3010</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-09-12T00:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Query to setup alert if the diskspace goes over 70%?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329498#M3011</link>
      <description>&lt;P&gt;Using below query, &lt;BR /&gt;
index=* sourcetype="Perfmon:Free Disk Space" counter="% Free Space" host=tableaufqt&lt;BR /&gt;
 | timechart avg(Value) AS PctFree BY host&lt;BR /&gt;
 | eval PctUsed = 100 - PctFree&lt;/P&gt;

&lt;P&gt;i got the diskspace&lt;/P&gt;

&lt;P&gt;2017-09-11 12:30:00 48.86669237574543&lt;/P&gt;

&lt;P&gt;now what should i add to the query that if it goes pass 70%, it sents out an alert?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 12:37:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329498#M3011</guid>
      <dc:creator>shakeel253</dc:creator>
      <dc:date>2017-09-12T12:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: Query to setup alert if the diskspace goes over 70%?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329499#M3012</link>
      <description>&lt;P&gt;First, change &lt;CODE&gt;timechart&lt;/CODE&gt; to &lt;CODE&gt;chart&lt;/CODE&gt; and then add back in the last line that we took out for debugging.  Go back to the original answer now that you have made or fake-to-real substitutions.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 14:25:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329499#M3012</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-09-12T14:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Query to setup alert if the diskspace goes over 70%?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329500#M3013</link>
      <description>&lt;P&gt;And "*" does not count for best practices.  Use the correct Index value.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 14:25:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329500#M3013</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-09-12T14:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Query to setup alert if the diskspace goes over 70%?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329501#M3014</link>
      <description>&lt;P&gt;the query worked, thankyou for your help&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 16:29:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-setup-alert-if-the-diskspace-goes-over-70/m-p/329501#M3014</guid>
      <dc:creator>shakeel253</dc:creator>
      <dc:date>2017-09-12T16:29:02Z</dc:date>
    </item>
  </channel>
</rss>

