# Icinga Dependency redundancy\_group

**URL:** <https://community.icinga.com/t/icinga-dependency-redundancy-group/12792>\
**Category:** Icinga 2\
**Created:** [October 23, 2023, 7:26am UTC](https://community.icinga.com/t/icinga-dependency-redundancy-group/12792 "2023-10-23T07:26:06Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![moreamazingnick](https://community.icinga.com/user_avatar/community.icinga.com/moreamazingnick/32/7725_2.png) [@moreamazingnick](https://community.icinga.com/u/moreamazingnick)\
**Post date:** [October 23, 2023, 7:26am UTC](https://community.icinga.com/t/icinga-dependency-redundancy-group/12792/1 "2023-10-23T07:26:06Z")

</div>

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”

```auto
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

---

<div class="post-metadata">

**Author:** ![Al2Klimov](https://community.icinga.com/user_avatar/community.icinga.com/al2klimov/32/959_2.png) [@Al2Klimov](https://community.icinga.com/u/Al2Klimov)\
**Post date:** [October 24, 2023, 11:36am UTC](https://community.icinga.com/t/icinga-dependency-redundancy-group/12792/2 "2023-10-24T11:36:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![moreamazingnick](https://community.icinga.com/user_avatar/community.icinga.com/moreamazingnick/32/7725_2.png) [@moreamazingnick](https://community.icinga.com/u/moreamazingnick)\
**Post date:** [October 24, 2023, 12:27pm UTC](https://community.icinga.com/t/icinga-dependency-redundancy-group/12792/3 "2023-10-24T12:27:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Al2Klimov](https://community.icinga.com/user_avatar/community.icinga.com/al2klimov/32/959_2.png) [@Al2Klimov](https://community.icinga.com/u/Al2Klimov)\
**Post date:** [October 24, 2023, 1:29pm UTC](https://community.icinga.com/t/icinga-dependency-redundancy-group/12792/4 "2023-10-24T13:29:09Z")

</div>

Sorry. My mistake. 🙈 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).

---

<div class="post-metadata">

**Author:** ![moreamazingnick](https://community.icinga.com/user_avatar/community.icinga.com/moreamazingnick/32/7725_2.png) [@moreamazingnick](https://community.icinga.com/u/moreamazingnick)\
**Post date:** [October 24, 2023, 6:55pm UTC](https://community.icinga.com/t/icinga-dependency-redundancy-group/12792/5 "2023-10-24T18:55:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![yhabteab](https://community.icinga.com/letter_avatar_proxy/v4/letter/y/ac91a4/32.png) [@yhabteab](https://community.icinga.com/u/yhabteab)\
**Post date:** [October 25, 2023, 7:24am UTC](https://community.icinga.com/t/icinga-dependency-redundancy-group/12792/6 "2023-10-25T07:24:10Z")

</div>

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

> [@moreamazingnick](#):
>
> `parent_host_name = "test"`

Here is also a blog post about the redundancy group, explaining the details [Dependency Redundancy Groups in Icinga 2.14](https://icinga.com/blog/2023/10/11/dependency-redundancy-groups-in-icinga-2-14/).

---

<div class="post-metadata">

**Author:** ![moreamazingnick](https://community.icinga.com/user_avatar/community.icinga.com/moreamazingnick/32/7725_2.png) [@moreamazingnick](https://community.icinga.com/u/moreamazingnick)\
**Post date:** [October 25, 2023, 7:33am UTC](https://community.icinga.com/t/icinga-dependency-redundancy-group/12792/7 "2023-10-25T07:33:31Z")

</div>

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

is it something like that?

```auto
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"
}

```

---

<div class="post-metadata">

**Author:** ![yhabteab](https://community.icinga.com/letter_avatar_proxy/v4/letter/y/ac91a4/32.png) [@yhabteab](https://community.icinga.com/u/yhabteab)\
**Post date:** [October 25, 2023, 9:18am UTC](https://community.icinga.com/t/icinga-dependency-redundancy-group/12792/8 "2023-10-25T09:18:20Z")

</div>

Well, you can’t [Monitoring Basics - Icinga 2](https://icinga.com/docs/icinga-2/latest/doc/03-monitoring-basics/#dependencies). It’s mandatory for host dependencies. If you omit it here, the apply rule will determine the parent host dynamically.

---

<div class="post-metadata">

**Author:** ![moreamazingnick](https://community.icinga.com/user_avatar/community.icinga.com/moreamazingnick/32/7725_2.png) [@moreamazingnick](https://community.icinga.com/u/moreamazingnick)\
**Post date:** [October 25, 2023, 9:52am UTC](https://community.icinga.com/t/icinga-dependency-redundancy-group/12792/9 "2023-10-25T09:52:46Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![moreamazingnick](https://community.icinga.com/user_avatar/community.icinga.com/moreamazingnick/32/7725_2.png) [@moreamazingnick](https://community.icinga.com/u/moreamazingnick)\
**Post date:** [October 31, 2023, 7:46am UTC](https://community.icinga.com/t/icinga-dependency-redundancy-group/12792/10 "2023-10-31T07:46:22Z")

</div>

> [@yhabteab](#):
>
> Hi, your `Brother MFC-L2710DN` is still reachable as it not only depends on `dummy1` and `dummy2` but also on `test`.

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

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