Nagios check_ssh plugin not working

1.3k views Asked by At

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.

1

There are 1 answers

0
Nagios Support On

This looks like it could be a few possible things:

  • Double check your only_from settings on the client (in the xinetd configuration)
  • If you're passing arguments via NRPE, you need to enable dont_blame_nrpe
  • Ensure that your NRPE process is running as nagios user and that the plugin directory has execute rights for the nagios user