Checking both percentage and space with check_disk - percentage fails

Albert Braden <abraden-P+sZE/[email protected]> Mon, 29 Feb 2016 17:58:21 +0000
Newsgroups gmane.network.nagios.plugins
Message-ID <A1E97C88EB03954BAA9A257488E7432B4F02995C__17649.6370732368$1456768782$gmane$org@S059EXCHMB01.staff.iaccap.com>
I am trying to use check_disk to alert if any drive is >60% full, or if any drive has less than 80M free, by using this command:

/usr/lib64/nagios/plugins/check_disk -l -x /dev -x /dev/shm -x /proc -x /dev/fd -w 40% -c 40% -C -w 80M -c 80M

My /var is 65% full, so I should get an alert but I do not:

DISK OK - free space: / 422045 MB (97% inode=99%); /boot 423 MB (91% inode=99%); /var 3353 MB (35% inode=99%);...

If I remove the "80M" check then it works:

/usr/lib64/nagios/plugins/check_disk -l -x /dev -x /dev/shm -x /proc -x /dev/fd -w 40% -c 40%

DISK CRITICAL - free space: / 422045 MB (97% inode=99%); /boot 423 MB (91% inode=99%); /var 3352 MB (35% inode=99%);...

Is it not possible to check both?

Albert Braden
About.com Systems Operations
mobile: 917-480-1090