THOLD - Disk Percentage calculations

Support questions about the Threshold plugin

Moderators: Developers, Moderators

mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Interesting, as I did not have to do this.

Mind posting your changes ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
Tommy_dk
Posts: 8
Joined: Wed Nov 18, 2009 4:45 pm

Post by Tommy_dk »

I have patched my Cacti according to the changes in this thread so that I could create thresholds for my Linux-machines, but I just discovered a slight difference in the way the percentage is being calculated.

On Linux the formula is:

Code: Select all

ceil( (<space used> / (<space used>+ <space free>)) * 100)
See: http://en.wikipedia.org/wiki/Df_%28Unix%29

This plugin uses:

Code: Select all

round( (<space used> / <space avail>) * 100, 2)
This example from one of my servers really shows the difference of the outcome:
1. formula: (6446896 / (6446896+778316)) * 100 = 89,22 ~ 90%
2. formula: (6446896 / 7611872) * 100 = 84,58 ~ 84,6%

The difference is quite big on the above example and creates quite a big error margin.

The <space avail> is, as far as i can see, not available in the MIB so that the formula could be changed to use the right values.

Has anyone got any comments on how to fix this? ;-)

/Tommy
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest