Page 1 of 1
Do not notify on services if host is down (alert grouping)
Posted: Thu Jun 19, 2014 3:14 pm
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.
Re: Do not notify on services if host is down (alert groupin
Posted: Sat Jun 21, 2014 7:55 pm
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.
Re: Do not notify on services if host is down (alert groupin
Posted: Fri Aug 07, 2015 12:03 am
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.)
Re: Do not notify on services if host is down (alert groupin
Posted: Fri Aug 07, 2015 1:26 am
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
Re: Do not notify on services if host is down (alert groupin
Posted: Fri Aug 07, 2015 3:38 pm
by krutaw
Oh my god, it's so obvious. Spot on, exactly what my problem is. You da man Troy!

Re: Do not notify on services if host is down (alert groupin
Posted: Sat Aug 08, 2015 5:19 pm
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?