Hi,
The command is defined, I changed for another command. Let me show the example:
- Child /etc/nagios/nrpe.cfg definitions:
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 200 -c 400
command[check_www_procs]=/usr/lib/nagios/plugins/check_procs -w 200 -c 400
- Master /etc/nagios3/providers/amazon/a105.cfg definitions:
define service{
use ckb-service ; Name of service template to use
host_name MY_SERVER
service_description Total Processes
check_command check_nrpe_ckb!MY_SERVER!check_total_procs
}
define service{
use ckb-service ; Name of service template to use
host_name MY_SERVER
service_description Total PHP pool www Processes
check_command check_nrpe_ckb!MY_SERVER!check_www_procs
}
/usr/local/nagios/bin/nagios -v /etc/nagios3/nagios.cfg
Total Warnings: 0
Total Errors: 0
/etc/init.d/nagios-nrpe-server restart
and
/etc/init.d/nagios3 restart
tail -f /var/log/syslog | grep nrpe
Nov 14 15:27:53 a105 nrpe[21840]: Added command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 200 -c 400
Nov 14 15:27:53 a105 nrpe[21840]: Added command[check_www_procs]=/usr/lib/nagios/plugins/check_procs -w 200 -c 400
Nov 14 15:27:53 a105 nrpe[21840]: INFO: SSL/TLS NOT initialized. Network encryption DISABLED.
Nov 14 15:27:53 a105 nrpe[21841]: Starting up daemon
Nov 14 15:27:53 a105 nrpe[21841]: Server listening on 0.0.0.0 port 5666.
Nov 14 15:27:53 a105 nrpe[21841]: Server listening on :: port 5666.
Nov 14 15:27:53 a105 nrpe[21841]: Listening for connections on port 0
Nov 14 15:27:53 a105 nrpe[21841]: Allowing connections from: 127.0.0.1,
MY_IP_SERVER
I guess everything is OK, but is not when I execute the remote command:
/usr/lib/nagios/plugins/check_nrpe -H MY_SERVER -n -c check_www_procs
NRPE: Command 'check_www_procs' not defined
/usr/lib/nagios/plugins/check_nrpe -H MY_SERVER -n -c check_total_procs
PROCS OK: 5 processes
The "old" command works fine, but the "new" command is not working. I really don't understand what is happening.
Regards,