答案1
此行为已在 2.3.10 中修复,因此可以存在多个主机依赖关系。(https://dev.icinga.org/issues/10058)
文档中有一整章: http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/monitoring-basics#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"
}