Page 1 of 1

nrds monitoring - start a detected stopped service

Posted: Sun May 14, 2017 7:46 pm
by ks6764
We are using passive nrds monitoring.

On the client server side where the nrds monitoring is running, I would like to setup the ability to start a service if it is detected as stopped.
I have seen examples when Google searching, but all the examples I have found appear to be using nrpe instead of nrds.
Our environment is very restricted for security reasons and the Nagios XI monitoring server would not be able to initiate the script on the client server remotely.
Is it possible to do what I am describing completely on the client side where the nrds monitoring is setup (not on the Nagios XI server side) ?

Thanks in advance to anyone that can provide and example and/or some documentation.

Re: nrds monitoring - start a detected stopped service

Posted: Mon May 15, 2017 12:33 pm
by dwhitfield
ks6764 wrote: Is it possible to do what I am describing completely on the client side where the nrds monitoring is setup (not on the Nagios XI server side) ?
Yes, but it wouldn't really involve nagios. Here's some information: https://serverfault.com/questions/25213 ... e-in-linux

If we knew what OS the remote machines were running, we might be able to help a bit more.

Re: nrds monitoring - start a detected stopped service

Posted: Mon May 15, 2017 12:39 pm
by ks6764
The OS for both our Nagios XI monitoring server as well as the client servers are Redhat Linux servers.

Re: nrds monitoring - start a detected stopped service

Posted: Mon May 15, 2017 12:48 pm
by dwhitfield
You can install monit with yum install monit.

You can find some specific examples of use at https://gist.github.com/codypo/905730

Please let us know if you decide to go to the NRPE direction instead.

Re: nrds monitoring - start a detected stopped service

Posted: Mon May 15, 2017 1:01 pm
by ks6764
I can go the nrpe route, I was just hoping to stick with nrds for consistency.

Should passive monitoring be done primarily over nrpe now as opposed to nrds ? Any advantages/disadvantages to using nrds vs nrpe ?

Re: nrds monitoring - start a detected stopped service

Posted: Mon May 15, 2017 1:26 pm
by dwhitfield
ks6764 wrote: Our environment is very restricted for security reasons and the Nagios XI monitoring server would not be able to initiate the script on the client server remotely.
If this is literally the case, then https://assets.nagios.com/downloads/nag ... h_NRPE.pdf is not going to be of use, but there it is nonetheless.

If the above is literally the case, then you'll need to do something on the remote servers. You'll need to talk to whoever is the sysadmin on the remote servers, as the XI server is unable to talk to the remote server.

You could certainly set up your commands to run (starting on page 3 of https://assets.nagios.com/downloads/nag ... h_NRDS.pdf), and not involve NRPE at all, but the XI server will still need to talk to the remote host (or perhaps there is a machine in the middle, and NRPE could be useful in that case).