configuring hostdependency

This forum was archived to /woltlab and is now in read-only mode.
  • Hello.


    I have question.
    How to change this config from Nagios3:


    define hostdependency {
    host_name host_a
    dependent_hostgroup_name group_b,group_c
    }


    to Icinga2 following the best practices?


    How to differ parent and hostdependency in Icinga2?

  • The dependent_hostgroup_name actually are the child hosts in those listed hostgroups. The best way so assign child_host_name to Dependency objects is using apply rules. That way you may use the powerful expression language and for example do the following:


    Code
    1. apply Dependency "host_a-group_bc" to Host {
    2. parent_host_name = "host_a"
    3. assign where "group_b" in host.groups
    4. assign where "group_c" in host.groups
    5. }