Bug in check_disk when using mount points?

frank ratty at they.org
Wed Feb 14 19:49:37 CET 2007


(Please pardon my top-posting)

The first problem is that the --help listing has a typo. Mount points are 
checked with '-M', megabytes are checked with '-m', but both are listed 
in lowercase when you use --help.

The second problem appears to be in the reporting of command line errors. 
Try putting your mount point after your -w and/or -c flags. In older 
version of the plugin it would complain when you left out either the -w or 
-c. Now it just reports (signed) 2^32 (if my mental math is right) in the 
performance data:

# ./check_disk -M -w 10% /home
DISK WARNING - free space: /dev/hda3 5904 MB (8% inode=95%);| /dev/hda3=63902MB;66188;-2147483648;0;73543

So yes, there are some issues in the plugin that deserve fixing, but it 
does work properly when given instructions in the correct order.

-f


On Wed, 14 Feb 2007, Hari Sekhon wrote:

> OK it's not just a bug with the -m switch but with the whole plugin.
> Observe:
>
>
> /usr/nagios/libexec/check_disk -l -w 2 -c 1 -u TB -vvv
> DISK OK - free space: / 0 TB (77% inode=98%); /dev 0 TB (100%
> inode=98%); /home/match/ramdisk 0 TB (17% inode=100%); /dev/shm 0 TB
> (100% inode=100%); /boot 0 TB (93% inode=100%);
> 0 of 0 TB (77% inode=98%) free on /dev/sda2 (type ext3 mounted on /)
> warn:2 crit:1 warn%:-1% crit%:-1%
> 0 of 0 TB (100% inode=98%) free on udev (type tmpfs mounted on /dev)
> warn:2 crit:1 warn%:-1% crit%:-1%
> 0 of 0 TB (17% inode=100%) free on tmpfs (type tmpfs mounted on
> /home/match/ramdisk) warn:2 crit:1 warn%:-1% crit%:-1%
> 0 of 0 TB (100% inode=100%) free on shm (type tmpfs mounted on /dev/shm)
> warn:2 crit:1 warn%:-1% crit%:-1%
> 0 of 0 TB (93% inode=100%) free on /dev/sda1 (type ext3 mounted on
> /boot) warn:2 crit:1 warn%:-1% crit%:-1%| /=0TB;0;0;98;0
> /dev=0TB;0;0;97;0 /home/match/ramdisk=0TB;0;0;99;0 /dev/shm=0TB;0;0;99;0
> /boot=0TB;0;0;99;0
>
> Hari Sekhon
>
>
>
> Hari Sekhon wrote:
>> I'm using check disk and want to have it test the filesystem of a
>> mount point rather than a partition.
>>
>> # df /
>> Filesystem           1K-blocks      Used Available Use% Mounted on
>> /dev/sda2            153337060  28240084 117307864  20% /
>>
>> DF shows the filesystem is 20% used so I want this to force an error
>> using the following test line so see that it actually works:
>>
>> check_disk -m / -w 90%
>>
>> the above check_disk should show Warning at this point as there is
>> less than 90% free space left. Whether I do 10% or 90% it still
>> returns successful even when it's not in the threshold range.
>>
>> # /usr/nagios/libexec/check_disk -m /home -w 100%
>> DISK OK - free space: / 114558 MB (77% inode=98%);|
>> /=35185MB;149743;149743;98;149743
>> # /usr/nagios/libexec/check_disk -m /home -w 10%
>> DISK OK - free space: / 114558 MB (77% inode=98%);|
>> /=35185MB;149743;149743;98;149743
>> # /usr/nagios/libexec/check_disk -m /home -w 90%
>> DISK OK - free space: / 114558 MB (77% inode=98%);|
>> /=35185MB;149743;149743;98;149743
>>
>>
>> The same is true when I was testing the /boot partition (which is a
>> separate partition). So it looks like the -m switch is broken.
>>
>>
>> Can anyone verify this? Is it a known bug, is it fixed?
>>
>> I am running "check_disk (nagios-plugins 1.4.3) 1.64" (taken from the
>> top line of check_disk --help)
>>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list