Disable host notification if a specific service is critical

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
Edouard
Posts: 5
Joined: Wed Apr 08, 2015 4:25 am

Disable host notification if a specific service is critical

Post by Edouard »

Hello,

I'm using Nagios with NRPE to monitor some linux servers via a "proxy" server running NRPE too.
So if the proxy's NRPE stop working, the monitored servers after won't be able to be checked, and Nagios will consider them as DOWN. I will receive 2 mails (1 for the proxy's NRPE service CRITICAL, and one for the distant monitored server "DOWN").

I want to disable notifications for this distant-server if the service NRPE is CRITICAL on the proxy.
I've tried with hostdependencies and servicesdependencies, but it seems that a service & host dependency is not possible..

Any help ?

Edouard
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Disable host notification if a specific service is criti

Post by jdalrymple »

I can't think of an elegant solution.

An inelegant one would be to create a 3rd host - call it proxy, make it's check_host_alive "check_nrpe -H proxyhost" then make it a parent of host 2. The idea being to turn the NRPE service into a host so you have something to work with.
Edouard
Posts: 5
Joined: Wed Apr 08, 2015 4:25 am

Re: Disable host notification if a specific service is criti

Post by Edouard »

Thanks for your reply,

Another solution would be to put the check NRPE command in the hostcheck command for the proxy -> it will send me only one mail like "proxy server is DOWN" instead of "NRPE service is CRITICAL"

I will think about your idea

If anyone have a better solution, please share

Edouard
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Disable host notification if a specific service is criti

Post by jdalrymple »

Your solution is actually *the right* solution if you can't create a proper (ICMP) host check for the remote host. Of course it can result in false alerts - but in the event that you can't monitor it by any other means they really wouldn't be any more false than to say that it's up all the time.
Locked