Swap the flag orders, use --units or -u flag before the -M<br>
/usr/lib/nagios/plugins/check_disk -w 7% -c 5% -u GB -M /ocfs2/sap03 <br>should work<br>regards<br>ranjib<br><div class="gmail_quote">On Thu, May 5, 2011 at 8:24 PM, Werner Flamme <span dir="ltr"><<a href="mailto:werner.flamme@ufz.de">werner.flamme@ufz.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
Hi everyone,<br>
<br>
I am fascinated by check_disk... When looking at the output of<br>
"check_disk --help", I read<br>
<br>
- ---snip---<br>
check_disk v1.4.15 (nagios-plugins 1.4.15)<br>
[...]<br>
-p, --path=PATH, --partition=PARTITION<br>
Path or partition (may be repeated)<br>
[...]<br>
-M, --mountpoint<br>
Display the mountpoint instead of the partition<br>
-m, --megabytes<br>
Same as '--units MB'<br>
[...]<br>
-u, --units=STRING<br>
Choose bytes, kB, MB, GB, TB (default: MB)<br>
- ---pins---<br>
<br>
So I constructed a command:<br>
- ---<br>
/usr/lib/nagios/plugins/check_disk -w 7% -c 5% -M /ocfs2/sap03 -u GB<br>
- ---<br>
and I expected the output in GB, but I got:<br>
- ---<br>
DISK OK - free space: /dev/sdd 759752 MB (54% inode=54%);|<br>
/dev/sdd=640899MB;1302605;1330618;0;1400651<br>
- ---<br>
I get the result in MB instead of GB, because check_disk misinterprets<br>
- -M as -m. As a proof I tried the command<br>
- ---<br>
/usr/lib/nagios/plugins/check_disk -w 7% -c 5% -p /ocfs2/sap03 -u GB<br>
- ---<br>
and got - as expected -<br>
- ---<br>
DISK OK - free space: /ocfs2/sap03 741 GB (54% inode=54%);|<br>
/ocfs2/sap03=625GB;1271;1298;0;1367<br>
- ---<br>
<br>
BTW, I'm working with SLES 11 SP1 here, but the nagios plugin packages<br>
are taken from the server:monitoring repository on SUSE's build service<br>
(<<a href="http://software.opensuse.org/repositories/server:/monitoring" target="_blank">http://software.opensuse.org/repositories/server:/monitoring</a>>)<br>
<br>
It was nice if the next version of the plugin would differ between<br>
uppercase and lowercase letters ;-)<br>
<br>
Regards,<br>
Werner<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v2.0.16 (GNU/Linux)<br>
Comment: Using GnuPG with SUSE - <a href="http://enigmail.mozdev.org/" target="_blank">http://enigmail.mozdev.org/</a><br>
<br>
iEYEARECAAYFAk3CujYACgkQk33Krq8b42OvEQCfVWEEIuUQTzhRX1xIm3/UZT8Z<br>
ajQAnjuwGNbjTKEtHHoTc6Kuha43r+cc<br>
=01Wk<br>
-----END PGP SIGNATURE-----<br>
<br>
------------------------------------------------------------------------------<br>
WhatsUp Gold - Download Free Network Management Software<br>
The most intuitive, comprehensive, and cost-effective network<br>
management toolset available today. Delivers lowest initial<br>
acquisition cost and overall TCO of any competing solution.<br>
<a href="http://p.sf.net/sfu/whatsupgold-sd" target="_blank">http://p.sf.net/sfu/whatsupgold-sd</a><br>
_______________________________________________<br>
Nagiosplug-help mailing list<br>
<a href="mailto:Nagiosplug-help@lists.sourceforge.net">Nagiosplug-help@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagiosplug-help" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagiosplug-help</a><br>
::: Please include plugins version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br>
</blockquote></div><br>