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
Disable service notification if host down
Re: Disable service notification if host down
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?
Do you have a use case where scheduled downtime is not appropriate?
-
- Posts: 16
- Joined: Tue Jun 03, 2014 2:35 am
Re: Disable service notification if host down
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.
-
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Disable service notification if host down
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.
Today - event handlers are the way.
Re: Disable service notification if host down
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.
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.
Re: Disable service notification if host down
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!
-
- Posts: 16
- Joined: Tue Jun 03, 2014 2:35 am
Re: Disable service notification if host down
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
Thanks for the explanation
Re: Disable service notification if host down
Sounds good, we'll keep this thread open for additional comments and your follow-up. Thanks!