Hari,

Works fine here (this is on Fedora 4) - check_disk (nagios-plugins 1.4.5) 1.79:

[EMAIL PROTECTED] ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1              12G  1.4G   10G  13% /
/dev/hda5             4.6G   33M  4.4G   1% /tmp
/dev/hda6              56G  912M   52G   2% /endeavour
none                  247M     0  247M   0% /dev/shm
[EMAIL PROTECTED] ~]$ sudo -u nagios /usr/local/nagios/libexec/check_disk -w 20% -c 10% -p / DISK OK - free space: / 10180 MB (87% inode=96%);| /=1406MB;9764;10985;0;12206 [EMAIL PROTECTED] ~]$ sudo -u nagios /usr/local/nagios/libexec/check_disk -w 90% -c 10% -p / DISK WARNING - free space: / 10180 MB (87% inode=96%);| /=1406MB;1220;10985;0;12206 [EMAIL PROTECTED] ~]$ sudo -u nagios /usr/local/nagios/libexec/check_disk -w 95% -c 90% -p / DISK CRITICAL - free space: / 10180 MB (87% inode=96%);| /=1406MB;610;1220;0;12206

Even with the megabytes switch (-m):

[EMAIL PROTECTED] ~]$ sudo -u nagios /usr/local/nagios/libexec/check_disk -w 10100 -c 10000 -m -p / DISK OK - free space: / 10180 MB (87% inode=96%);| /=1406MB;2106;2206;0;12206 [EMAIL PROTECTED] ~]$ sudo -u nagios /usr/local/nagios/libexec/check_disk -w 10190 -c 10000 -m -p / DISK WARNING - free space: / 10180 MB (87% inode=96%);| /=1406MB;2016;2206;0;12206 [EMAIL PROTECTED] ~]$ sudo -u nagios /usr/local/nagios/libexec/check_disk -w 12000 -c 11000 -m -p / DISK CRITICAL - free space: / 10180 MB (87% inode=96%);| /=1406MB;206;1206;0;12206

Have you tried the latest version of the plugins?

Andy.


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@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

!DSPAM:37,45d347e218511427819843!




--
Andy Shellam
NetServe Support Team

the Mail Network
"an alternative in a standardised world"

p: +44 (0) 121 288 0832/0839
m: +44 (0) 7818 000834

-------------------------------------------------------------------------
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@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

Reply via email to