Advertisements
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
I successfully configured Nagios client for Ubuntu, but I only get response for
ReplyDeleteCurrent Load, Users, Total Processes & Zombie processes.
The Ping, root partition, SSH and swap gives error:
command 'check_####' not defined.
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
ReplyDelete"command 'check_ping' not defined"
"command 'check_disk' not defined"
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.
DeleteThanks for the reply,
ReplyDeletebut 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.
Are they present on both server and client? Have you added the commands in nrpe.cfg?
Delete