<?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: Disk Rate of Change Monitor in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/Disk-Rate-of-Change-Monitor/m-p/89258#M7413</link>
    <description>&lt;P&gt;I think it will work if you just add "by Host_FileSystem " to your &lt;CODE&gt;stats&lt;/CODE&gt; command. I would also use &lt;CODE&gt;earliest&lt;/CODE&gt; and &lt;CODE&gt;latest&lt;/CODE&gt; instead of &lt;CODE&gt;first&lt;/CODE&gt; and &lt;CODE&gt;last&lt;/CODE&gt;. And I think that you may need need to adjust your calculation.&lt;BR /&gt;
You are expressing the disk usage in percentage already. What does "% Rate of Change" really mean? If you were using 30% of the filesystem and are now using 40% of the file system one hour later, the rate of change is 10% per hour. Or you could compute the "rate of change" based on prior usage, so it would be 10/30*100 = 33%. Dividing &lt;CODE&gt;current&lt;/CODE&gt; by &lt;CODE&gt;previous&lt;/CODE&gt; gets you a ratio, but not a percentage...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="os" sourcetype="df" host="*" 
| multikv fields FileSystem, UsePct  
| strcat host '@' Filesystem Host_FileSystem 
| eval UsedPct=rtrim(UsePct,"%")
| convert num(usedPct)
| stats earliest(UsedPct) as previous, latest(UsedPct) as current by Host_FileSystem 
| eval rateofchange=round((current-previous)/previous,2) 
| where rateofchange &amp;gt; 20
| rename rateofchange as "% Rate of Change" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 09 Oct 2013 15:58:39 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2013-10-09T15:58:39Z</dc:date>
    <item>
      <title>Disk Rate of Change Monitor</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Disk-Rate-of-Change-Monitor/m-p/89257#M7412</link>
      <description>&lt;P&gt;I'd like to detect when disk rate of change exceeds 20% within a 1 hour period and the search below works for a single host and fails when searching all hosts.&lt;/P&gt;

&lt;P&gt;Search:&lt;BR /&gt;
index="os" sourcetype="df" host="*" | multikv fields FileSystem, UsePct  | strcat host '@' Filesystem Host_FileSystem    |eval UsedPct=rtrim(UsePct,"%")| convert num(usedPct)| stats first(UsedPct) as previous, last(UsedPct) as current | eval rateofchange=current/previous | rename rateofchange as "% Rate of Change" | where current/previous &amp;gt; 20&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2013 03:21:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Disk-Rate-of-Change-Monitor/m-p/89257#M7412</guid>
      <dc:creator>ericca</dc:creator>
      <dc:date>2013-10-09T03:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Disk Rate of Change Monitor</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Disk-Rate-of-Change-Monitor/m-p/89258#M7413</link>
      <description>&lt;P&gt;I think it will work if you just add "by Host_FileSystem " to your &lt;CODE&gt;stats&lt;/CODE&gt; command. I would also use &lt;CODE&gt;earliest&lt;/CODE&gt; and &lt;CODE&gt;latest&lt;/CODE&gt; instead of &lt;CODE&gt;first&lt;/CODE&gt; and &lt;CODE&gt;last&lt;/CODE&gt;. And I think that you may need need to adjust your calculation.&lt;BR /&gt;
You are expressing the disk usage in percentage already. What does "% Rate of Change" really mean? If you were using 30% of the filesystem and are now using 40% of the file system one hour later, the rate of change is 10% per hour. Or you could compute the "rate of change" based on prior usage, so it would be 10/30*100 = 33%. Dividing &lt;CODE&gt;current&lt;/CODE&gt; by &lt;CODE&gt;previous&lt;/CODE&gt; gets you a ratio, but not a percentage...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="os" sourcetype="df" host="*" 
| multikv fields FileSystem, UsePct  
| strcat host '@' Filesystem Host_FileSystem 
| eval UsedPct=rtrim(UsePct,"%")
| convert num(usedPct)
| stats earliest(UsedPct) as previous, latest(UsedPct) as current by Host_FileSystem 
| eval rateofchange=round((current-previous)/previous,2) 
| where rateofchange &amp;gt; 20
| rename rateofchange as "% Rate of Change" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Oct 2013 15:58:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Disk-Rate-of-Change-Monitor/m-p/89258#M7413</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-10-09T15:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Disk Rate of Change Monitor</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Disk-Rate-of-Change-Monitor/m-p/89259#M7414</link>
      <description>&lt;P&gt;Your suggestion worked !!!  I modified the stats command per your suggestion to return a percentage.&lt;/P&gt;

&lt;P&gt;index="os" sourcetype="df" host="*" earliest=-2h@h latest=@h&lt;BR /&gt;
| multikv fields FileSystem, UsePct&lt;BR /&gt;&lt;BR /&gt;
| strcat host '@' Filesystem Host_FileSystem &lt;BR /&gt;
| eval UsedPct=rtrim(UsePct,"%")&lt;BR /&gt;
| convert num(usedPct)&lt;BR /&gt;
| stats earliest(UsedPct) as previous, latest(UsedPct) as current by Host_FileSystem &lt;BR /&gt;
| eval rateofchange=round(((current-previous)/previous)*100,2) &lt;BR /&gt;
| where rateofchange &amp;gt; 1 &lt;BR /&gt;
| table _time host Host_FileSystem previous current rateofchange&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:56:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Disk-Rate-of-Change-Monitor/m-p/89259#M7414</guid>
      <dc:creator>ericca</dc:creator>
      <dc:date>2020-09-28T14:56:05Z</dc:date>
    </item>
  </channel>
</rss>

