check_disk sometimes wrong


I am running the nrpe-server 2.5.1-3 on an linux box with debian etchnhalf. I installed from the debian repositories (not from source).

When I do a check of sda3 the result is OK, but when I check sda2 (which is root-filesystem) I get wrong results.
df gives:

elise:/usr/lib/nagios/plugins# df -h Dateisystem Größe Benut Verf Ben% Eingehängt auf /dev/sda2 5,0G 396M 4,4G 9% / tmpfs 4,0G 0 4,0G 0% /lib/init/rw udev 10M 68K 10M 1% /dev tmpfs 4,0G 0 4,0G 0% /dev/shm /dev/sda3 266G 22G 231G 9% /home /dev/sda5 7,4G 3,3G 3,7G 48% /usr /dev/sda6 15G 2,6G 11G 20% /var
and the plugin gives:

elise:/usr/lib/nagios/plugins# ./check_disk -w 20 -c 10 -p /dev/sda3 DISK OK - free space: /home 235913 MB (91% inode=99%);| /home=22490MB;272212;272222;0;272232 elise:/usr/lib/nagios/plugins# elise:/usr/lib/nagios/plugins# ./check_disk -w 20 -c 10 -p /dev/sda2 DISK CRITICAL - free space: /dev 9 MB (99% inode=99%);| /dev=0MB;-10;0;0;10

Strange - isn´t it? Checks of sda5 and sda6 are OK too. It seems that the slash as name for the root-filesystem bothers things?

can anybody help or confirm the problem?

  • p switch is for partition not for devices. It should look like this:
    /usr/lib/nagios/plugins/check_disk -w 20 -c 10 -p /
    /usr/lib/nagios/plugins/check_disk -w 20 -c 10 -p /home
    Try that