Page 1 of 1

check_ssh unsolved

Posted: Fri Jan 10, 2014 2:34 am
by dre2007
Goodmorning,
I recently browsed the entire internet to find a good manual for check_ssh
I really don't know why the command doesn't work.

The host has of course been created.
What I am doing is in Objects.cfg:
define services{
use Generic-service
hostname PRDITSWEL01
service_description ssh monitoring
check_command check_ssh
}

COMMANDS.CFG
# 'check_ssh' command definition
define command{
command_name check_ssh
command_line $USER1$/check_ssh $ARG1$ $HOSTADDRESS$
}


The Error I receive is:
NRPE: Command 'check_ssh' not defined.

--------
I must say that I also tried to use the following as check_command: check_nrpe!check_ssh
so it could be an old output???

I am really stuck in this one.
I must admit that I didn't do anything on the remote host ( from which I want to know if the port is open ) and the port is closed ( but then I assume that I should received a message that the port is closed or some sort ).

Your help would be gratefully appreciated.

Re: check_ssh unsolved

Posted: Fri Jan 10, 2014 10:32 am
by abrist
check_ssh can be run from the nagios server as it is just checking a remote, public port. You do not use check_ssh through nrpe (unless you are using nrpe to access a check proxy/firewalled node/etc).
dre2007 wrote:I must say that I also tried to use the following as check_command: check_nrpe!check_ssh
so it could be an old output???
I would agree. Can you try running check_ssh from the cli?

Code: Select all

/usr/local/nagios/libexec/check_ssh <hostname>
(replace <hostname> with the fqdn/ip of the host PRDITSWEL01)

Re: check_ssh unsolved

Posted: Sat Jan 11, 2014 11:08 am
by dre2007
Thanks that worked. Also opened the port so everything works now.

Re: check_ssh unsolved

Posted: Mon Jan 13, 2014 9:54 am
by slansing
Thanks for letting us know!