Creating host dependencies with data field to select parent host


We have a system with hundreds of hosts, grouped into maybe 10 locations, each behind their own router. I’d like to add a parent host dependency (of the site router) for all the devices behind it.

Rather than creating a dependency for each host, I thought a good idea would be to apply a single dependency whenever a host ‘parent_host’ field is set. In each device I’d set this value to the hostname of the site router, and the dependency check would use this field to match the parent router (and suppress checks and notifications).

Is this possible?
In the dependency template I can apparently enter variables (as it suggests) but it breaks things
(See )

But in the dependency apply rule I don’t seem to be able to enter host variables.

Or am I doing something stupid?

Any help appreciated :slight_smile:


  • Director version (System - About): master (c12f587)
  • Icinga Web 2 version and modules (System - About): 2.8.2 (8a89839af94a247ee2149b2336c73b8251b477c0)
  • Icinga 2 version (icinga2 --version): r2.12.1-1
  • Operating System and version: Ubuntu 18.04.5 LTS
  • Webserver, PHP versions: Apache/2.4.29 / PHP 7.2.24-0ubuntu0.18.04.7