Icinga2 dependecies of devices on HA

high-availabilityicingamonitoringsystem-monitoring

I would like to configure a Host-to-Host dependency on Icinga2, however, one of the Hosts has an HA configuration, so I need the to trigger it only when both HA devices are down. Suppose this scenario:

enter image description here

Let's say I have all these devices on Icinga2. It's clear that WAN switch has a dependency on both routers, so I want to avoid monitoring the WAN switch only if BOTH routers are down. I could not find anything like this on Icinga2 docs. Anybody has an idea of the best way to set this?

Best Answer

This behavior has been fixed in 2.3.10, so multiple host dependencies can exist. (https://dev.icinga.org/issues/10058)

There is a whole chapter in the docs: http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/monitoring-basics#dependencies

What you basically do two dependencies:

apply Dependency "behind-rtr1" to Host {
  parent_host_name = "rtr1"
  disable_checks = true
  disable_notifications = true

  // how ever you would specify that
  assign where host.vars.zone == "wan"
}
apply Dependency "behind-rtr2" to Host {
  parent_host_name = "rtr2"
  disable_checks = true
  disable_notifications = true

  // how ever you would specify that
  assign where host.vars.zone == "wan"
}
Related Topic