If you are configuring to monitor a remote host, you will have to add a command in your nrpe.cfg found at /usr/local/nagios/etc/
.
This command should be on the remote host. The sample commands that are already defined are :
/usr/local/nagios/libexec/check_nrpe -H localhost -c check_users
/usr/local/nagios/libexec/check_nrpe -H localhost -c check_load
/usr/local/nagios/libexec/check_nrpe -H localhost -c check_hda1
/usr/local/nagios/libexec/check_nrpe -H localhost -c check_total_procs
/usr/local/nagios/libexec/check_nrpe -H localhost -c check_zombie_procs
Then adding the command definition to the any of the config file that you have specified in nagios.cfg
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
And finally your host and service
Correct me if i am wrong. I am not sure if nagios would reset the settings back to default for commands.cfg.