[Nagiosplug-help] check_disk 1.4.15 misinterprets -M ... as -m
Werner Flamme
werner.flamme at ufz.de
Fri May 6 12:35:39 CEST 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
ranjib dey [06.05.2011 08:11]:
> 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
Hi ranjib,
thanks, it does help!
So it would be enough to change the usage line to put -u in front of -M:
- ---snip---
Usage:
check_disk -w limit -c limit [-W limit] [-K limit] {-p path | -x device}
[-C] [-E] [-e] [-g group ] [-k] [-l] [-M] [-m] [-R path ] [-r path ]
[-t timeout] [-u unit] [-v] [-X type]
- ---pins---
:-D
Werner
> On Thu, May 5, 2011 at 8:24 PM, Werner Flamme <werner.flamme at ufz.de> wrote:
>
> 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
>>
>>
-
------------------------------------------------------------------------------
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
>>
> ------------------------------------------------------------------------------
> 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
- --
Werner Flamme, Abt. WKDV
Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
Helmholtz Centre for Environmental Research - UFZ
Permoserstr. 15 - 04318 Leipzig
Tel./phone: +49 341 235-1921 - Fax +49 341 235-451921
Information nach §§ 37a HGB, 35a GmbHG:
Sitz der Gesellschaft: Leipzig
Registergericht: Amtsgericht Leipzig, Handelsregister Nr. B 4703
Vorsitzender des Aufsichtsrats: MinR Wilfried Kraus
Wissenschaftlicher Geschäftsführer: Prof. Dr. Georg Teutsch
Administrativer Geschäftsführer: Dr. Andreas Schmidt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/
iEYEARECAAYFAk3DzvsACgkQk33Krq8b42MJ1wCfU6RzwKqUvHOqz3V6HHpYhT1B
CKYAn1PdFHCovwTb5H4RkjosqrkQSoVE
=2w5E
-----END PGP SIGNATURE-----
More information about the Help
mailing list