Page 1 of 1
Check_disk plugin returning incorrect filesystem usage
Posted: Thu Mar 31, 2016 10:26 pm
by crystal.then
Hello,
I'm having issues with the check_disk plugin - it's returning the incorrect filesystem usage for a single filesystem.
Check returns:
# /usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /tsm/tsmdbbackup
DISK CRITICAL - free space: /tsm/tsmdbbackup 413556 MB (9% inode=99%);| /tsm/tsmdbbackup=3780235MB;3355033;3774412;0;4193792
Actual usage (in MB):
# df -m /tsm/tsmdbbackup
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/tsmdbb_01 20971008.00 17190772.54 19% 76 1% /tsm/tsmdbbackup
So the expected output of the check is "DISK OK - 81% free"
Version is:
check_disk v1.4.16 (nagios-plugins 1.4.16)
OS is:
AIX 7100-03-05-1524
Anybody else run into this issue, or have any ideas?
Re: Check_disk plugin returning incorrect filesystem usage
Posted: Fri Apr 01, 2016 9:44 am
by rkennedy
There may have been a bug fixed between your version, and the current. I just verified the current check_disk version on my local machine and it's 2.0.3.
Code: Select all
[root@localhost libexec]# ./check_disk -V
check_disk v2.0.3 (nagios-plugins 2.0.3)
Could you update and let us know the result?
Re: Check_disk plugin returning incorrect filesystem usage
Posted: Mon Apr 04, 2016 10:27 pm
by crystal.then
Hi rkennedy,
Thanks for your reply. I've updated the check_disk plugin to 2.0.3, but I'm still running in to the same issue:
# ./check_disk -e -w 20% -c 10% -p /tsm/tsmdbbackup
DISK CRITICAL - free space: /tsm/tsmdbbackup 269480 MB (6% inode=99%);| /tsm/tsmdbbackup=3924311MB;3355033;3774412;0;4193792
# df -m /tsm/tsmdbbackup
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/tsmdbb_01 20971008.00 17046696.55 19% 76 1% /tsm/tsmdbbackup
# ./check_disk -V
check_disk v2.0.3 (nagios-plugins 2.0.3)
Re: Check_disk plugin returning incorrect filesystem usage
Posted: Tue Apr 05, 2016 11:19 am
by rkennedy
Are you seeing the correct result without the
-e? I'm trying to replicate this over here, but having issues.
Code: Select all
[root@localhost libexec]# ./check_disk -V
check_disk v2.0.3 (nagios-plugins 2.0.3)
[root@localhost libexec]# ./check_disk -w 20% -c 10% -p /dev/sda1
DISK OK - free space: /boot 374 MB (75% inode=99%);| /boot=122MB;396;446;0;496
[root@localhost libexec]# df -m /dev/sda1
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/sda1 497 123 375 25% /boot
Re: Check_disk plugin returning incorrect filesystem usage
Posted: Tue Apr 05, 2016 9:44 pm
by crystal.then
Yes, it detects the same amount of space regardless of the flags I use. It's also getting the total size of the filesystem wrong as well, as seen in the perf data. Seems like it can't handle such large filesystems. I've just checked on another server with a 15TB filesystem and it gets that wrong too.
I found this post, so I guess that it was a known issue at one point:
https://support.nagios.com/forum/viewto ... 35&t=28474
Nagios Plugins 2.1.0 comes with the note "check_disk.c – Prevent large tide values from truncation (JesperForsberg)", but I've just tried 2.1.1 and unfortunately it's still getting it wrong:
Code: Select all
# ./check_disk.2.1.1 -V
check_disk v2.1.1 (nagios-plugins 2.1.1)
# ./check_disk -w 20% -c 10% -p /tsm/tsmdbbackup
DISK CRITICAL - free space: /tsm/tsmdbbackup 224172 MB (5% inode=99%);| /tsm/tsmdbbackup=3969619MB;3355033;3774412;0;4193792
From my testing the plugin does well with filesystems up to 6TB, although I don't have any filesystems sized between 6-15TB so I'm not sure where the cutoff is. We can check the filesystem with our own scripts, just wanted to use check_disk to keep it all standardised... I'm happy for you to close this as a known issue

Re: Check_disk plugin returning incorrect filesystem usage
Posted: Wed Apr 06, 2016 10:48 am
by lmiltchev
Nagios Plugins 2.1.0 comes with the note "check_disk.c – Prevent large tide values from truncation (JesperForsberg)", but I've just tried 2.1.1 and unfortunately it's still getting it wrong:
This commit only fixed the "up to 4GB" problem. It would need a different change to go even higher. Please enter a new issue in github:
https://github.com/nagios-plugins/nagios-plugins/issues
I'm happy for you to close this as a known issue

I will be locking this thread now. Thank you!