Nagios checks a service, it turns out that its down so it sends a notification and after it has sent the notification, it checks the host and realizes that the host is down as well.
How do I get Nagios wait to send the service notification until after it checks the host. If they host is down, don’t bother sending the service notification but it the host is up, then send it.
Here is a quick shot of my log that gives a good example of the problem I am having:
[1272636844] SERVICE ALERT: TestHost;PING;CRITICAL;HARD;1;PING CRITICAL - Packet loss = 100%
[1272636844] SERVICE NOTIFICATION: pcsupport;TestHost;PING;CRITICAL;notify-service-by-email;PING CRITICAL - Packet loss = 100%
[1272636857] HOST ALERT: TestHost;DOWN;HARD;1;CRITICAL - Host Unreachable (10.2.1.57)
[1272636857] HOST NOTIFICATION: pcsupport;TestHost;DOWN;notify-host-by-email;CRITICAL - Host Unreachable (10.2.1.57)
That seem to have fixed it. Thanks for the advice.
I guess I made the assumption that it wouldn’t send the notification until the host was check, not realizing that as soon as the state is determined hard, it would send the notification.