Icinga Dependency redundancy_group

I’m trying to figure out icinga dependency / reundancy groups.

There is a host named “test” with 2 services dummy1, dummy2
There is a host named “Brother MFC-L2710DN”

template Dependency "test" {
}

apply Dependency "dummy2" to Host {
    import "test"

    parent_host_name = "test"
    disable_notifications = true
    assign where host.name == "Brother MFC-L2710DN"
    parent_service_name = "dummy2"
    redundancy_group = "TEST"
}

apply Dependency "dummy1" to Host {
    import "test"

    parent_host_name = "test"
    disable_notifications = true
    assign where host.name == "Brother MFC-L2710DN"
    parent_service_name = "dummy1"
    redundancy_group = "TEST"
}

I assume that my config would prevent notifications on “Brother MFC-L2710DN” if the dependency group TEST (dummy1, dummy2 both critical) is no longer satisfied but notifications are still sent out.

so here are my questions:
Does redundancy_group work on applyrules?
Is there something wrong in my logic?

I use applyrules because I’m trying to get it to work with director and this are the actuall rendered and validated config files, after patching the director

Thanks for any help on that matter and

Best Regards
Nicolas

Give as much information as you can, e.g.

  • Version used (icinga2 --version) :2.14
  • Operating System and version: 20.04

Hello Nicolas!

The redundancy groups are for the case that at least one parent is OK.

If both are down, of course you’ll get notifications.

Best,
A/K

Thanks for the reply,

ok I tried out the following
dummy1->critical
Brother MFC-L2710DN-> critical
==>notification

dummy1->ok
dummy2->ok
Brother MFC-L2710DN-> critical
==>notification

Sorry. My mistake. :see_no_evil: At least one parent OK means the dependency is fulfilled and does NOT prevent notifications. But if both are critical, you should NOT get notifications (at the first sight).

ok I tried out the following
dummy1->critical
dummy2->critical
Brother MFC-L2710DN-> critical
==>notification

Hi, your Brother MFC-L2710DN is still reachable as it not only depends on dummy1 and dummy2 but also on test.

Here is also a blog post about the redundancy group, explaining the details Dependency Redundancy Groups in Icinga 2.14.

what would be the syntax if i want to only depend on services?

is it something like that?

apply Dependency "dummy1" to Host {
    import "test"

    disable_notifications = true
    assign where host.name == "Brother MFC-L2710DN"
    parent_service_name = "test!dummy1"
    redundancy_group = "TEST"
}

Well, you can’t Monitoring Basics - Icinga 2. It’s mandatory for host dependencies. If you omit it here, the apply rule will determine the parent host dynamically.

but that means that a host state cannot directly depend on a service state
and if I set the host “test” down too the notification will be omitted?

Now I tried the following all in hard states:
dummy1 => critical
dummy2 => critical
test => down

Brother MFC-L2710DN => down => still got the notification