Thursday, December 8, 2011

NRPE: Command 'check_disk' not defined


This error is coming because the missing of check_disk command on the client machine
open the following file and add the check_disk command as follows

root@server1 [/opt/Nagios/Nagios_NRPE/nrpe-2.12]# vi /usr/local/nagios/etc/nrpe.cfg
command[check_disk]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/sda
save the file. That it.

You can also test the command as below on the client server.
root@server1 [/opt/Nagios/Nagios_NRPE/nrpe-2.12]# /usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/sda
DISK OK - free space: / 863034 MB (99% inode=99%);| /=4696MB;731966;823462;0;914958


  1. I successfully configured Nagios client for Ubuntu, but I only get response for
    Current Load, Users, Total Processes & Zombie processes.

    The Ping, root partition, SSH and swap gives error:
    command 'check_####' not defined.

  2. I successfully configured Nagios server as well as clients. Now, I am try to configure client on Ubuntu, but getting only (Current Load, Current Users, Total Processes & Zombie process) some responses and remaining (Ping, disk, ssh & swap) gives error

    "command 'check_ping' not defined"
    "command 'check_disk' not defined"

    1. The commands check_ping and check_disk are not in the server and client. That must be the reason you are getting this error. Download the files of these commands and place it on the proper location( probably /usr/local/nagios/libexec/). It will work.

  3. Thanks for the reply,
    but the files are present at desired location & I can manually run/check commands on client (Ubuntu).

    The path is slightly different in ubuntu (/usr/lib/nagios/plugins/) and it contains all the required files.

    1. Are they present on both server and client? Have you added the commands in nrpe.cfg?


Be nice. That's all.