bundlewrap/bundles/icinga2/files/icinga2/hosts.conf
Franzi 63fd31c226
All checks were successful
bundlewrap/pipeline/head This commit looks good
bundles/icinga2: support specifying an alternative host for checks
2020-11-21 10:58:57 +01:00

17 lines
530 B
Plaintext

% for monitored_node in sorted(monitored_nodes):
object Host "${monitored_node.name}" {
import "generic-host"
vars.os = "Linux"
vars.sla = "${monitored_node.metadata.get('sla', '24x7')}"
vars.period = "${sla_info[monitored_node.metadata.get('sla', '24x7')]}"
address = "${monitored_node.metadata.get('icinga_options', {}).get('hostname', monitored_node.hostname)}"
}
% endfor
apply Dependency "disable-service-checks-on-host-down" to Service {
disable_checks = true
ignore_soft_states = true
assign where true
}