Page 1 of 1
Service check either or
Posted: Tue Mar 10, 2015 12:50 pm
by jkinning
Running Nagios XI 2014R2.6 and monitoring SLES 11sp3 server for SSH. On majority of our servers we are leveraging Centrify SSH which I am using the check_nrpe command - $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$ with ARG1 = check_init_service and ARG2 = -a 'centrify-sshd' is there a way to have this check monitor for centrify-sshd OR sshd? I have this service check assigned to a service template since majority of my machines are running centrify-sshd but would like to either have this check for either of the sshd services or allow me to exclude the few I have that aren't running Centrify SSH and using the stock SSH.
Re: Service check either or
Posted: Tue Mar 10, 2015 12:53 pm
by jdalrymple
What you want to do isn't really possible without some amount of customization. The simplest thing to do (assuming in "either or" case the SSHD is listening on the same port) you can just use the check_ssh plugin and exclude checking the daemon using NRPE. Is this not an option?
Re: Service check either or
Posted: Tue Mar 10, 2015 1:21 pm
by jkinning
They all are listening on port 22. So I can use that method and never thought about it like that.
Although I have some machines that sit in our DMZ which the Firewall guys have port 5666 open so I can't check. Can the check_nrpe check for this information or execute the check_ssh locally and return the information on port 5666?
Re: Service check either or
Posted: Tue Mar 10, 2015 1:27 pm
by jdalrymple
You got it...
nrpe.cfg on dmzhost:
Code: Select all
command[check_local_ssh]=/usr/local/nagios/libexec/check_ssh -H localhost
Code: Select all
[jdalrymple@nagios libexec]$ ./check_nrpe -H dmzhost -c check_local_ssh
SSH OK - OpenSSH_5.3 (protocol 2.0) | time=0.002912s;;;0.000000;10.000000
In this example I used dmzhost, but of course you could do this for any host in which you can talk to NRPE.