I get a nagios to monitor server 2003 via snmp, but the disk storage used percentage is wrong. 221GB/300G how can it be 17% used? I use snmputil to test the sever storage from local, it is ok,
the block size is 4096, so 56696972x4= 221G around.
C:\Documents and Settings\adm>snmputil get 127.0.0.1 public .1.3.6.1.2.1.25.2.3.1.6.4
Variable = host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.4
Value = Integer32 56696972
only E drive have this problem. but the others is working perfect! I don't know why.
even I run the script in prompt mode, same result. but F drive is ok.
[root@atcntest libexec]# ./check_snmp_storage -C public -H 10.101.161.131 -m ^E -w 80% -c 90%
OK : E:\ Label:data Serial Number 88074d8d: 18%used(222095MB/307196MB) : < 80 % | 'E:\ Label:data Serial Number 88074d8d'=222094MB;245756;276476;0;307196
[root@atcntest libexec]# ./check_snmp_storage -C public -H 10.101.161.131 -m ^F -w 80% -c 90%
OK : F:\ Label:dataF Serial Number 60c115cc: 78%used(160405MB/204797MB) : < 80 % | 'F:\ Label:dataF Serial Number 60c115cc'=160404MB;163837;184317;0;204797
I also ran into this problem. It is caused by a "long int" overflow in the percent calculation.
I have attached a patch that fixes the issue.