I'm trying to configure a service check via NRPE and having some difficulty.<br><br>From the monitoring server, I can successfully execute NRPE via CLI:<br><br>[root@mon01 etc]# /usr/local/nagios/libexec/<div id=":1k0" class="ii gt">
check_nrpe -H 10.140.122.51 -c check_prov<br>
FILE_AGE OK: /var/log/prov.log is 4 seconds old and 8033817 bytes<br><br>All my hosts are in /usr/local/nagios/etc/hosts, with service_checks defined in them. I defined this NRPE check as:<br><br>define service{<br> use generic-service<br>
host_name servername.serverdomain<br> service_description check_prov<br> is_volatile 0<br> check_period 24x7<br> max_check_attempts 3<br>
normal_check_interval 3<br> retry_check_interval 1<br> notification_interval 120<br> notification_period 24x7<br> notification_options w,u,c,r<br>
check_command check_nrpe!check_prov<br>}<br><br>within nagios.cfg, I have a commands.cfg file defined:<br><br>cfg_file=/usr/local/nagios/etc/objects/commands.cfg<br><br>within commands.cfg:<br><br># 'check_ccprov' command definition<br>
define command{<br> command_name check_prov<br> command_line $USER1$/check_nrpe -H $HOSTADDRESS -c check_prov<br> }<br><br>Nagios is giving me an error:<br><br>Checking services...<br>Error:
Service check command 'check_nrpe' specified in service 'check_ccprov'
for host 'servername.serverdomain' not defined anywhere!<br>
<br>But it is defined?! From the documentation the check_command should be "check_nrpe!$service" within service definition?<br><br>Thanks!</div>