Is it possible in nagios to check host down before service notification

monitoringnagios

is it possible to have nagios check for host down before a service failure is sent? if a host is down or rebooted we get a lot of service notifications but just need the 1 host down..

its a really annoying issue because we linked nagios to our ticket system

update:

Im not sure what happened, we have 2 nagios environments, I just inherited the environment from the other department and it was one of their major complains with it (was also new to me since my own environment has more checks and never had this issue)

After cleaning up the (hardly functioning) environment and implementing it in a helpdesk tool (otrs) I didnt see this behaviour so I suspect the messages were just in the minds of the coworkers (since nagios was mailing several times a minute!)

its now green after a few weeks hard work and the department is very happy with it…

sorry that I didnt close this issue before and thank you for your time!

another update:
finally figured it out (I think). the nagios agent (opsview) crashed so it sends out the connection refused by host messages. I think that was bothering the IT department.

Best Answer

Something must be misconfigured somewhere, or the host is coming up quicker than the service checks failing. Even in the URL that Khaled posted it says host checks are done on-demand when a service changes state:

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 basically says that Nagios will check on set intervals, and when a service changes state. When a service breaks (goes into a WARNING/CRITICAL state), a host check is executed, and if the host is seen as down, it should suppress the service notifications, assuming you have it configured that way. Can you show us your service and host definitions, masking any hostname/addresses to protect the innocent if you want.

As a side note, I've been using Nagios for years, and never had a service alert when a host is in a down state, unless I specifically configured it to do so.

Related Topic