Page 1 of 2

wrong stats with discs higher 120To

Posted: Fri Dec 27, 2013 4:01 am
by midou
Hi,

I have a problem when I monitor disks quota higher than 120To.
when I mount an NFS share (quota=120To) on a Linux server the Stats reported by Nagios are correct but when I increase the quota to 130To or more I obtains a wrong result.
Do you know if this is a limitation Nagios and if there is a patch that corrects this behavior?

Thank you very much for your response.

Re: wrong stats with discs higher 120To

Posted: Fri Dec 27, 2013 10:12 am
by sreinhardt
What type of plugin are you trying to use to monitor that? I know that snmp in all varieties (windows, linux, and proprietary) have had issue because they use a 32 bit int as the counter for bytes or kB which is not large enough and rolls over. However check_nrpe or check_by_ssh with local disk check plugins should not be seeing this same issues as far as we know.

Re: wrong stats with discs higher 120To

Posted: Fri Dec 27, 2013 11:07 am
by midou
thank you for your response
I use check_snmp_storage.pl
It work fine with nrpe but for some reasons I can't install nrpe on theses servers.
Is there other solution to have correct disk usage ?

Re: wrong stats with discs higher 120To

Posted: Fri Dec 27, 2013 11:40 am
by abrist
You could alter the check output to use GB if you have not tried already:

Code: Select all

/usr/local/nagios/libexec/check_snmp_storage.pl --help | grep byte

Code: Select all

-G, --gigabyte
   output, warning & critical levels in gigabytes

Re: wrong stats with discs higher 120To

Posted: Fri Dec 27, 2013 3:11 pm
by midou
same result with -G
it give a wrong size of disk (in GB)

Re: wrong stats with discs higher 120To

Posted: Mon Dec 30, 2013 9:12 am
by scottwilkerson
What SNMP version are you using?

Re: wrong stats with discs higher 120To

Posted: Tue Dec 31, 2013 3:37 am
by midou
I use v2C

Re: wrong stats with discs higher 120To

Posted: Thu Jan 02, 2014 11:45 am
by abrist
I wonder if you are hitting an snmp integer length limitation. What does the GB output look like (how far is it off)?
Can you give us an example of the command and its output?

Re: wrong stats with discs higher 120To

Posted: Fri Jan 03, 2014 6:02 am
by midou
here is an example :


./check_snmp_storage.pl -H server -G -C public -m '/' -w 80% -c 90% --v2c
/DATA: 1%used(7GB/931GB) /NFS: 163%used(102736GB/62945GB) /home: 2%used(1GB/28GB) /2: 1%used(0GB/19GB) /: 35%used(7GB/19GB) /boot: 7%used(0GB/0GB) (>90%) : CRITICAL

/NFS would be under 25%
total size = 496To

Re: wrong stats with discs higher 120To

Posted: Fri Jan 03, 2014 10:59 am
by abrist
I have been doing some digging on this, though I am still unsure if this is a limitation of snmp or the plugin itself. Lets try to get/walk the oid and check for a negative integer (this would imply the value has overflowed):

Code: Select all

snmpget -v1 -c public server 1.3.6.1.2.1.25.2.3.1
snmpget -v1 -c public server 1.3.6.1.2.1.25.2.3.1.5
snmpget -v1 -c public server 1.3.6.1.2.1.25.2.3.1.6
snmpget -v1 -c public server 1.3.6.1.2.1.25.2.3.1.4