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 [email protected] 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
