Dependency Host to Host

Hi community,

I’m facing an issue with an apply rule for the dependencies.
I need a host-host dependency, so when the parent Host goes down, the child Host will turn into the unreachable state and no notification will be send out for the child.
Problem is now that the rule I created doesn’t get applied because supposedly the dependency rule doesnt match anywhere. But I can’t realy figure out why the dependency doesn’t match. :sweat_smile:

The rules I created:

With the Icinga director a dependency template got created which gets imported into the dependency apply rule. The Parent-Host Object in the dependency apply rule is set to $host.vars.varname$. I also tried setting the Parent-Host Object to a non variable, an existing Host, but get the same result when trying to deploy it.

The Data Fields for parent_host_name and child_host_name are strings for the datatype and set in the Hosts with the Hostname.
I’ve tried already several properties in the apply rule, with no different result. Am I missing something? I cant’t find any more “tipps” in the Icinga docs. Can someone help me troubleshooting this problem? :slightly_smiling_face:

I’m using the Icinga Web 2 Version 2.9.3. The director is also up to date 1.8.1 and the PHP version is 7.1.30.

Thank you!

Hi @aaron

you don’t have to use the “assign where” conditions here. Just create a data field (i. e. “parent_host”) and add it to the dependency.

Now you can create a new data field called “parent_host” and add it to an existing host template.

PS: I recommend setting the data type of the field to “DirectorObject”, Object to “Host” and Target data type to “Array” so you can choose from already existing hosts. :slight_smile:

Kind regards


Sorry, … I must have missed something in your post :grimacing:

I created the data field with the field name “parent_host”, with the mentioned recommended settings. So I was able to just pick the right parent Host in the Host settings.
But, as soon as I just set the related Objects in the dependencies to “$host.vars.parent_host$” it resolves in the same error message during deployment.

Do I have any to set any other Object Types? Something is still missing if the dependency doesn’t match. :confused:
Something I can provide which helps solving the problem?

Thank you!

Kinds regards

EDIT: sorry for the confusion! The dependency works as its supposed to do! The Log is showing a warning due there was no parent down during the deployment. The problem is finally solved. :+1: