nagios monitoring a failover process

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
chrislewis28
Posts: 11
Joined: Tue Jun 04, 2013 6:49 am

nagios monitoring a failover process

Post by chrislewis28 »

Hi,

We have a service which runs in a failover mode and I would like Nagios to monitor it. The logic would be:

check if process is running on host A if yes return OK status, if no check if process is running on host B if yes return OK status if no return critical status.

Is there a way Nagios can do this without me having to write my own plugin?

Chris
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: nagios monitoring a failover process

Post by gshergill »

Hi chrislewis28,

I think you may be looking for service dependency.

Check these links, they should provide you with the details.

http://nagios.sourceforge.net/docs/3_0/ ... dependency
http://nagios.sourceforge.net/docs/3_0/ ... ncies.html

Good luck!

Kind Regards,

Gary Shergill
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: nagios monitoring a failover process

Post by sreinhardt »

I would agree, that service dependencies may be one way to do it, however it sounds like you could write a script that takes both hosts and the service to check. Checks the first provided, if off, checks the second host, if both are off fails critical. Off hand I do not know of a check that does this, but with more information regarding what this service is maybe we can find something.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked