Hello,
The check seems to consistently return the wrong % disk usage, the bigger the disk the bigger the discrepancy:
snmpdf does fine:
[root@mgt-ada-01]# snmpdf -v 2c -c ************ host
Description size (kB) Used Available Used%
*****************************************************************************
/ 12254384 2407600 9846784 19%
***************************************************************************
/boot 499656 78136 421520 15%
/home 1998672 5108 1993564 0%
/var 12254384 3902820 8351564 31%
---------------------------------------------------------------------------------------
NAGIOS check result:
/dev/shm: 0%used(0MB/938MB) /var: 32%used(3810MB/11967MB) /boot: 16%used(76MB/488MB) /home: 0%used(5MB/1952MB) /: 20%used(2351MB/11967MB) (<80%) : OK
On another host nagios says 88% but df says 94%
anybody come acros this?
check_snmp_storage.pl % wrong
Re: check_snmp_storage.pl % wrong
What kind of device are you checking against?
Former Nagios Employee.
me.
me.
Re: check_snmp_storage.pl % wrong
Hi,
RedHat & Centos boxes
RedHat & Centos boxes
Re: check_snmp_storage.pl % wrong
I do believe that Nagios is calculating properly by rounding up, rather than down which SNMPDF seems to be doing. Here are the results from an analysis I did of the numbers you posted -
Nagios Calculations
SNMPDF Calculations
Nagios Calculations
Code: Select all
/var
3810mb / 11967mb = .31837
3901440kb / 12254208kb = .31837 (32%)
/boot
76mb / 488mb = .15573
77824kb / 499712kb = .15573 (16%)
Code: Select all
/var
3902820kb / 12254384kb = .31848 (31%)
/boot
78136kb / 499656kb = .15637 (15%)
Former Nagios Employee
Re: check_snmp_storage.pl % wrong
Hmmm
I believe you are correct
df is rather a pig
The round up gets far worse, df on a host is reporting 94% when it is in fact 88%
astounding
Thanks for your help
I will be more careful in future & check the facts before posting
Regards
I believe you are correct
df is rather a pig
The round up gets far worse, df on a host is reporting 94% when it is in fact 88%
astounding
Thanks for your help
I will be more careful in future & check the facts before posting
Regards
Re: check_snmp_storage.pl % wrong
No problem. It's interesting to see how all of the different calculations work. One other possible factor is how they divide, whether it be by 1024 or 1000, and that introduces a bit more factors.
I'll close this thread out now, but feel free to open a new one if you ever need more assistance.
I'll close this thread out now, but feel free to open a new one if you ever need more assistance.
Former Nagios Employee