Host Dependencies


#1

I am havin an issue with nagios reporting a configuration error when i define more than 2 dependent hosts to a parent host.

eg

define hostdependency {
host_name topswitch
dependent_host_name switch1,switch2,switch3
inherits_parent 1
notification_failure_criteria d,u
}

(topswitch is dependent on the switch where the nagios box is plugged in)

I have alos tried defining them individaly in each of the swiches config file

switch1…

define hostdependency {
dependent_host_name switch1
host_name topswitch
inherits_parent 1
notification_failure_criteria d,u
}

Am i miss configuring or miss understanding host dependancies?
thanks in advance


#2

Here:
nagios.sourceforge.net/docs/2_0/ … ncies.html
you can see that you should rather use parent/child host relationships then host dependencies. But if you have to use host dependencies you must create host dependency definition for every dependent host. You cannot define them in one definition like you’ve did in first example. Second example is good, although I don’t know what error you get when you apply second definition. You cuold post those errors here.

If you use parent/child host relationships, you don’t have to create additional host dependency definition, 'cause defining parents cover both host_check and notification suppress.


#3

Ah ok thanks for that will give it a shot


#4

According to the 3.0 documentation:

dependent_host_name: This directive is used to identify the short name(s) of the dependent host(s). Multiple hosts should be separated by commas.

The dependent hosts in my case are virtual machines. I need them dependent on the vmware server. The parent relationship would be incorrect in this instance as if the vm server is down it isn’t a case of the dependent machines being unreachable - they would also be down…

As such given the 3.0 docs a host dependency of the multiple guests to the one host would be correct.

however I see the same behaviour as the parent poster - 1-2 dependent hosts is fine but 3+ results in a circular reference error on checks despite no such error being present.