Do not notify on services if host is down (alert grouping)

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
autlycus
Posts: 1
Joined: Thu Jun 19, 2014 3:09 pm

Do not notify on services if host is down (alert grouping)

Post by autlycus »

I'm not sure if this has been asked before or not, and my googling has been fruitless. That being said, I'm trying to find a way to stop Nagios from sending messages for each failed service on a host if the host itself has failed. Currently when a host fails I get at least 15 messages (one for the host and one for each service associated with that host or its groups). This generates a fair amount of noise and it would be nice to be able to squelch some of this so that users and admins don't become complacent to the barrage of messages.
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Do not notify on services if host is down (alert groupin

Post by eloyd »

If all is configured well, and you have host checks enabled, Nagios will check that the host is actually up if a service check fails. If the host fails its check, then Nagios assumes that the services on it will fail as well, and will not check them. I can't remember - you may get one notification about the first service, but the rest should never even be checked.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
krutaw
Posts: 60
Joined: Wed Jul 31, 2013 6:30 pm

Re: Do not notify on services if host is down (alert groupin

Post by krutaw »

eloyd wrote:If all is configured well, and you have host checks enabled, Nagios will check that the host is actually up if a service check fails. If the host fails its check, then Nagios assumes that the services on it will fail as well, and will not check them. I can't remember - you may get one notification about the first service, but the rest should never even be checked.
I'd love to hear how exactly that's accomplished from a configuration perspective (outside of service dependencies for each host.)
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Do not notify on services if host is down (alert groupin

Post by Box293 »

Have a read of this, it has a full scenario that explains how it all works.

http://sites.box293.com/nagios/guides/c ... -intervals
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
krutaw
Posts: 60
Joined: Wed Jul 31, 2013 6:30 pm

Re: Do not notify on services if host is down (alert groupin

Post by krutaw »

Box293 wrote:Have a read of this, it has a full scenario that explains how it all works.

http://sites.box293.com/nagios/guides/c ... -intervals
Oh my god, it's so obvious. Spot on, exactly what my problem is. You da man Troy! :)
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Do not notify on services if host is down (alert groupin

Post by jdalrymple »

Just one more thing to point out to add to Box293's explanation - services changing state can aid in "hurrying along" the host failure by way of on-demand checks. Note the times that a host is checked:
Host Checks wrote:When Are Host Checks Performed?

Hosts are checked by the Nagios daemon:

At regular intervals, as defined by the check_interval and retry_interval options in your host definitions.
On-demand when a service associated with the host changes state.
On-demand as needed as part of the host reachability logic.
On-demand as needed for predictive host dependency checks.
This can of course also be tuned with the host caching parameters, descirbed here

It can get complicated - so it might be best to just generalize the whole thing and roll with Box293's explanation as it pretty well covers it all. I just wanted to point out those couple of modifiers in case you dig deep and see more unexpected behavior.

OK to lock?
Locked