[Nagiosplug-devel] check_disk --megabytes doesn't work

Chris Pepper pepper at reppep.com
Tue May 19 16:30:24 CEST 2009


nagiosplug-devel-request at lists.sourceforge.net wrote:

> Date: Tue, 19 May 2009 00:10:37 +0200
 > From: Matthias Eble <PsychoTrahe at gmx.de>
 > Subject: Re: [Nagiosplug-devel] check_disk --megabytes doesn't work
 > To: Nagios Plugin Development Mailing List 
<nagiosplug-devel at lists.sourceforge.net>
 > Message-ID: <1242684637.7811.4.camel at pc.site>
 > Content-Type: text/plain
 > Hi Chris,
>> > 	The help says I can use --megabytes, but when I do it eats the -w 
>> > argument and causes an error.
>> > 
>> > http://nagiosplugins.org/man/check_disk
>> > 
>> > Chris
>> > 
>> >  > maguro:~ # /usr/local/nagios/libexec/check_disk -m -w 3% -c 1% -p /
>> >  > DISK OK - free space: / 3912 MB (81% inode=96%);| 
>> > /=873MB;4889;4990;0;5041
>> >  > maguro:~ # /usr/local/nagios/libexec/check_disk --megabytes -w 3% -c 
>> > 1% -p /
>> >  > DISK CRITICAL - 3% is not accessible: No such file or directory
>> >  > maguro:~ # /usr/local/nagios/libexec/check_disk --version
>> >  > check_disk v2025 (nagios-plugins 1.4.13)
> 
> I cannot reproduce this, here (at least not with the current git
> version. Can you try the latest one? You can find it here:
> http://repo.or.cz/w/nagiosplugins.git
> 
> Otherwise: maybe there's a bug in your getopt parser? I can't remember
> any commits that could've affected this.

Matthias,

	It looks like this has indeed changed since the last plugin release. On 
a CentOS 5.2 system, the release complains if --megabytes is the last 
argument, while a build from git works.

Chris

> -bash-3.2$ ./plugins/check_disk -l --megabytes
> DISK OK - free space: / 4650 MB (62% inode=95%); /home 109429 MB (99% inode=99%); /var 3567 MB (94% inode=99%); /boot 224 MB (94% inode=99%); /dev/shm 1975 MB (100% inode=99%); /noribeast0a 5227326 MB (66% inode=99%); /noribeast0b 2174653 MB (27% inode=97%); /noribeast0c 371462 MB (99% inode=99%); /noribeast1a 2822197 MB (36% inode=98%); /noribeast1b 2188479 MB (27% inode=96%); /noribeast1c 369582 MB (99% inode=99%);| /=2786MB;;;0;7841 /home=287MB;;;0;115688 /var=194MB;;;0;3966 /boot=13MB;;;0;250 /dev/shm=0MB;;;0;1975 /noribeast0a=2606394MB;;;0;8252946 /noribeast0b=5659067MB;;;0;8252946 /noribeast0c=1771MB;;;0;393207 /noribeast1a=5011523MB;;;0;8252946 /noribeast1b=5645241MB;;;0;8252946 /noribeast1c=3651MB;;;0;393207
> -bash-3.2$ pwd
> /home/pepper/nagios/nagiosplugins.git
> -bash-3.2$ ./plugins/check_disk --version
> check_disk v1.4.13.git (nagios-plugins 1.4.13)
> -bash-3.2$ /usr/local/nagios/libexec/check_disk -l --megabytes
> /usr/local/nagios/libexec/check_disk: option `--megabytes' requires an argument
> Unknown argument
> 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]
> -bash-3.2$ /usr/local/nagios/libexec/check_disk --version
> check_disk v2025 (nagios-plugins 1.4.13)
> -bash-3.2$ uname -a
> Linux norimaki.cbio.mskcc.org 2.6.18-92.1.22.el5 #1 SMP Tue Dec 16 11:57:43 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
> -bash-3.2$ cat /etc/redhat-release
> CentOS release 5.2 (Final)


-- 
Chris Pepper:                <http://cbio.mskcc.org/>
                              <http://www.extrapepperoni.com/>




More information about the Devel mailing list