Services -> host -> host dependance notification


#1

Hi,
I have a running nagios 2.0b3 with 86 hosts and 160 services.
Everything works quite well, i have all the hosts dependeces (parent settings are ok), but sometime i don’t get what i want.

Example:
If nagios checks a service on a host, and that fails, nagios must check the host before send me a notification of that failed service. If the host fails too, nagios must check the parent host before to send me notification of that failed host and so on.
Instead I get first the service notification, than perhaps the host and so on.

There is a way to set nagios like i want it?

Thank You


#2

Nagios is a service checking program. Meaning that there is actually no host check! Surprised! Cause the host check is actually a ping which is a service check…

Actually i posted something like this way back. Not very sure if its possible but heard that u can write a script to check so and so.

Hopefully someone wiser can help u here. :slight_smile:


#3

Nagios 1.x works just the way you described. If the service check fails, it checks the host. If the host fails it checks the parent, if the parent is ok, it notifies you about the HOST ONLY, depending on how you have your notifications setup.

Perhaps you have included too many status’ for failures.
In other words, in services.cfg i have this:
notification_options w,c,r

The reason is, because I don’t care about the other’s. If a service check is UNKNOWN, i don’t care because it’s usually due to some other problem.

In the hosts.cfg file I have:
host_notification_options d,r
because I don’t care about the u (unreachable) state. It’s unreachable due to a d state on the parent.

So the problem you are having is due to the way you have it setup. If you don’t want the emails you are getting, then change the reason’s that notifications are sent out.


#4

BTW, 2.0 works the same way. So just simply change your hosts.cfg and your services.cfg for the notification options directive.