Disable service notification if host down

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
NAGOWNER92
Posts: 16
Joined: Tue Jun 03, 2014 2:35 am

Disable service notification if host down

Post by NAGOWNER92 »

Good morning,
is it possible to don't receive service notification if host host goes down ? As example If a host is down or rebooted we get a lot of unnecessary service notifications...

Thanks in advance
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Disable service notification if host down

Post by jolson »

It sounds like you may be interested in scheduled downtime. http://nagios.sourceforge.net/docs/3_0/downtime.html

Do you have a use case where scheduled downtime is not appropriate?
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
NAGOWNER92
Posts: 16
Joined: Tue Jun 03, 2014 2:35 am

Re: Disable service notification if host down

Post by NAGOWNER92 »

Surely, scheduled downtime is a way to solve this problem when a system administrator turns off server to make update. I would like to solve problem when system goes down alone and i wouldn't to receive service notification but only that host goes down and up.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Disable service notification if host down

Post by jdalrymple »

The current method of dealing with this is event handlers. We've had some feedback indicating that this isn't an acceptable solution so internally there are some proposed code changes that will make what you want a valid configuration option, maybe in a future release of Core.

Today - event handlers are the way.
User avatar
millisa
Posts: 69
Joined: Thu Jan 16, 2014 11:13 pm
Location: Austin, TX
Contact:

Re: Disable service notification if host down

Post by millisa »

I don't think I've seen the conditions described here in nagios 4 (and possibly not in nagios 3). On all of my nagios servers, when a host is down, service notifications are suppressed (with a few odd exceptions, but they are definitely not the norm).

This is the relevant doc excerpt from http://nagios.sourceforge.net/docs/3_0/hostchecks.html :
From 'When are Host Checks Performed?'
On-demand checks are made when a service associated with the host changes state because Nagios needs to know whether the host has also changed state. Services that change state are often an indicator that the host may have also changed state. For example, if Nagios detects that the HTTP service associated with a host just changed from a CRITICAL to an OK state, it may indicate that the host just recovered from a reboot and is now back up and running.

Is it possible the host check_interval, max_check_attempts, and retry_interval values are configured in such a way that their hosts are not going critical before the services reach their check_interval, max_check_attempts, and retry_interval? A host check should be happening as soon as the service state changes. Do you have your service's max_check_attempts set to '1'?

Last year, Box293 had a good example of a scenario that could cause service notifications to go out when the host is down despite the nagios hostcheck logic that should prevent it from happening.
(it mostly boils down to if you have the host retry_interval set higher than service's retry_interval, you're going to increase your chances of notification spam when the host is being rebooted).

There's definitely still timing issues that could be improved, but they shouldn't be coming up all that often for host-down-service-check type scenarios.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Disable service notification if host down

Post by lmiltchev »

NAGOWNER92, let us know if your question has been answered. Is it safe to lock this topic?
Be sure to check out our Knowledgebase for helpful articles and solutions!
NAGOWNER92
Posts: 16
Joined: Tue Jun 03, 2014 2:35 am

Re: Disable service notification if host down

Post by NAGOWNER92 »

I will try this solution. It seems a good method to resolve the issue. I will let you know if question has been answered.
Thanks for the explanation
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Disable service notification if host down

Post by jolson »

Sounds good, we'll keep this thread open for additional comments and your follow-up. Thanks!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Locked