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!
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
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.
Please show the configuration of the hosts from the preview tab and check for typos there.
Normally when the dependency is configured correctly the parent state turns critical (or warn) and the child’s state turns unknown (to Show the dependency) with not-ok results
Thank You very much!
This was resulting to solve the problem.
After i tried Your cli command, this was shown:
warning/cli: This data is 324 days, 4 hours and 36 minutes older than the last Icinga config (re)load. It may be outdated. Consider running ‘icinga2 daemon -C --dump-objects’ first.
After i did ‘icinga2 daemon -C --dump-objects’ the Dependency looks like its working! What can cause the reason, Icinga is loading outdated configs?
@Cherry Slight misunderstanding here. Icinga 2 doesn dump the configuration into files at every reload anymore (since a few versions), but the icinga2 object list command reads from those files (legacy stuff I guess).
Therefore you have to tell Icinga 2 to dump the config first to view it, but it was already running with that configuration.
If you can see the dependencies there, they are there (and active), the question is now why it does not yet work as intented (or does it by now)?