[Nagiosplug-help] check_disk 1.4.15 misinterprets -M ... as -m

ranjib dey dey.ranjib at gmail.com
Fri May 6 08:11:31 CEST 2011


Swap the flag orders, use --units or -u flag before the -M
/usr/lib/nagios/plugins/check_disk -w 7% -c 5% -u GB -M /ocfs2/sap03
should work
regards
ranjib
On Thu, May 5, 2011 at 8:24 PM, Werner Flamme <werner.flamme at ufz.de> wrote:

> -----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-----
>
>
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today.  Delivers lowest initial
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20110506/19dd613f/attachment.html>


More information about the Help mailing list