wrong stats with discs higher 120To

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
midou
Posts: 11
Joined: Thu Nov 28, 2013 9:45 am

wrong stats with discs higher 120To

Post 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.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: wrong stats with discs higher 120To

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
midou
Posts: 11
Joined: Thu Nov 28, 2013 9:45 am

Re: wrong stats with discs higher 120To

Post 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 ?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: wrong stats with discs higher 120To

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
midou
Posts: 11
Joined: Thu Nov 28, 2013 9:45 am

Re: wrong stats with discs higher 120To

Post by midou »

same result with -G
it give a wrong size of disk (in GB)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: wrong stats with discs higher 120To

Post by scottwilkerson »

What SNMP version are you using?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
midou
Posts: 11
Joined: Thu Nov 28, 2013 9:45 am

Re: wrong stats with discs higher 120To

Post by midou »

I use v2C
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: wrong stats with discs higher 120To

Post 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?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
midou
Posts: 11
Joined: Thu Nov 28, 2013 9:45 am

Re: wrong stats with discs higher 120To

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: wrong stats with discs higher 120To

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked