check_ssh unsolved

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
dre2007
Posts: 5
Joined: Mon Sep 30, 2013 8:52 am

check_ssh unsolved

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: check_ssh unsolved

Post 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)
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
dre2007
Posts: 5
Joined: Mon Sep 30, 2013 8:52 am

Re: check_ssh unsolved

Post by dre2007 »

Thanks that worked. Also opened the port so everything works now.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_ssh unsolved

Post by slansing »

Thanks for letting us know!
Locked