Apply Dependency in Icinga Director doesnt work

Hello,

we are trying to do Parent-Child Dependencies on our Routers, so we dont get spammed with Notification when the Core-Router is going down.

We have all our configuration in Icinga Director.
Here is what the config is looking like:

Parent: DSL-Router:

Child: Switch

With the custom var “parent” filled with the hostname of the Parent.

The Apply-Dependency:

This configuration is not working, when the parent and child goes offline, both still send an email notification. We want only a notification from the parent.
I checked the documentation in the icinga2 config and couldnt find any error in our configuration. I tested also, if the apply Rule is triggering. I created a new Hostgroup apply on “host.vars.parent” == DSL-Router and the Child-Switch was in that hostgroup. So its applying correctly.

Does anyone have any idea on what is wrong here?
Thank You really much!

Cherry

Hello,
Could you share what is defined under “Related Objects” in the Dependency? And/or the Preview of the dependency?
Thank you,
Jean

oh sorry:

Config in /var/lib/icinga2/api/zones/icinga.domain.com/director/dependency_apply.conf

apply Dependency "Parent-Child" to Host {
    import "Parent Firewall"

    parent_host_name = "DSL-Router"
    disable_checks = true
    disable_notifications = true
    ignore_soft_states = true
    assign where host.vars.parent == "DSL-Router"
    states = [ Up ]
}

Hello,
The configuration looks fine.
In what order are your notifications triggered? If you notice that the notifications for the children are triggered first, you may want to delay them, so that Icinga has the time to assess that the parent has reached the Down status, which will activate the dependency, marking the children as “Unreachable”, which in turn will have the effect of not sending the notification for the children (even if their own Down status was reached before the parent’s).
Hoping this is clear,
Jean

Hello Jean,

we simulated multiple network failures by changing the IP-Adress of the Router and the Switch on the same time. We get the notification of the Router first and 2-3 Minutes after that we will receive the notification of the switch.