[Nagiosplug-help] check_disk 1.4.15 misinterprets -M ... as -m
Werner Flamme
werner.flamme at ufz.de
Thu May 5 16:54:46 CEST 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi everyone,
I am fascinated by check_disk... When looking at the output of
"check_disk --help", I read
- ---snip---
check_disk v1.4.15 (nagios-plugins 1.4.15)
[...]
-p, --path=PATH, --partition=PARTITION
Path or partition (may be repeated)
[...]
-M, --mountpoint
Display the mountpoint instead of the partition
-m, --megabytes
Same as '--units MB'
[...]
-u, --units=STRING
Choose bytes, kB, MB, GB, TB (default: MB)
- ---pins---
So I constructed a command:
- ---
/usr/lib/nagios/plugins/check_disk -w 7% -c 5% -M /ocfs2/sap03 -u GB
- ---
and I expected the output in GB, but I got:
- ---
DISK OK - free space: /dev/sdd 759752 MB (54% inode=54%);|
/dev/sdd=640899MB;1302605;1330618;0;1400651
- ---
I get the result in MB instead of GB, because check_disk misinterprets
- -M as -m. As a proof I tried the command
- ---
/usr/lib/nagios/plugins/check_disk -w 7% -c 5% -p /ocfs2/sap03 -u GB
- ---
and got - as expected -
- ---
DISK OK - free space: /ocfs2/sap03 741 GB (54% inode=54%);|
/ocfs2/sap03=625GB;1271;1298;0;1367
- ---
BTW, I'm working with SLES 11 SP1 here, but the nagios plugin packages
are taken from the server:monitoring repository on SUSE's build service
(<http://software.opensuse.org/repositories/server:/monitoring>)
It was nice if the next version of the plugin would differ between
uppercase and lowercase letters ;-)
Regards,
Werner
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/
iEYEARECAAYFAk3CujYACgkQk33Krq8b42OvEQCfVWEEIuUQTzhRX1xIm3/UZT8Z
ajQAnjuwGNbjTKEtHHoTc6Kuha43r+cc
=01Wk
-----END PGP SIGNATURE-----
More information about the Help
mailing list