I have a server that is used a middleman for a bunch of reverse ssh tunnels. I want to use nagios on that server to monitor that all of those ssh tunnels are up.
Essentially I want to do the nagios equivalent of:
ssh -p 12344 localhost
ssh -p 12415 localhost
ssh -p 12544 localhost
I have the following definitions:
define host{
use generic-host
host_name paniqui
address localhost
_PORT 12345
}
define hostgroup {
hostgroup_name chits-servers
alias CHITS servers
members paniqui
}
define service {
hostgroup_name chits-servers
service_description SSHTUNNEL
check_command check_ssh!-p $_HOSTPORT$ $HOSTADDRESS$
use generic-service
notification_interval 0 ; set > 0 if you want to be renotified
}
But when I check the service on the Nagios web interface I see:
Status Information: UNKNOWN (for 0d 2h 7m 50s)
Usage:check_ssh [-46] [-t <timeout>] [-r <remote version>] [-p <port>] <host>
Any suggestions?