2007/7/20, Aidan Anderson <<a href="mailto:mail@aidananderson.co.uk">mail@aidananderson.co.uk</a>>:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Have you set up the command definition correctly in commands.cfg or<br>wherever you store your commands on your Nagios server.  Also check that<br>Nagios has permission to execute the pluggin on the remote machine.<br>Test by re-trying your check_nrpe command logged on as nagios.
</blockquote><div><br>Yes, I setted up the command definition for check_nrpe on the Nagios server as the following:<br><br>define command{<br>        command_name    check_nrpe<br>        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
<br>        }<br><br>The command in the host configuration on the Nagios server is confgured as the following:<br><br>define service{<br>        use                     remote-service<br>        host_name               my.remote.server
<br>        service_description     SMART<br>        check_command           check_nrpe!check_smart_attributes<br>        }<br><br>If I test the command logged on as nagios on the Nagios server it works:<br><br>nagiosserver:/home/me# su nagios
<br>nagiosserver:/home/me$ whoami<br>nagios<br>nagiosserver:/home/me$ /usr/local/nagios/libexec/check_nrpe -H backuppc.foobar.local -c check_backuppc<br>BACKUPPC WARNING - (4/7) failures<br>nagiosserver:/home/me$<br><br>As you can see, it works, but it doesn't works from Nagios itself.
<br><br>Bye!<br></div></div>