When I run the below command in the Nagios client machine, it is working good.
**/usr/lib/nagios/plugins/check_ssh -H 127.0.0.1 -p 22**
*SSH OK - OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6 (protocol 2.0) | time=0.004430s;;;0.000000;10.000000*
When running from the Nagios Server, getting the below issue.
ubuntu@Nagios-server:/usr/lib/nagios/plugins$ ./check_nrpe -H <CLIENT-IP> -c check_ssh -n -H <CLIENT-IP> -p 2
CHECK_NRPE: Error receiving data from daemon.
Below is the service definition:
define service {
host qa-ad-useast-1.dpclk.com
use generic-service
check_command check_nrpe!check_ssh
service_description SSH Status
contact_groups admins
notifications_enabled 1
}
And command entry on nrpe.cfg is:
command[check_ssh]=/usr/lib/nagios/plugins/check_ssh -H $ARG1$
Anything wrong in service definition or command in passing the arguments.
This looks like it could be a few possible things:
only_from
settings on the client (in the xinetd configuration)dont_blame_nrpe
nagios
user and that the plugin directory has execute rights for thenagios
user