Franziska Kunsmann
b06532241b
All checks were successful
bundlewrap/pipeline/head This commit looks good
21 lines
878 B
Text
21 lines
878 B
Text
% for monitored_node in sorted(monitored_nodes):
|
|
object Host "${monitored_node.name}" {
|
|
import "generic-host"
|
|
|
|
address = "${monitored_node.metadata.get('icinga_options/hostname', monitored_node.hostname)}"
|
|
|
|
vars.os = "${monitored_node.os}"
|
|
vars.sla = "${monitored_node.metadata.get('sla', '24x7')}"
|
|
vars.period = "${sla_info[monitored_node.metadata.get('sla', '24x7')]}"
|
|
vars.location = "${monitored_node.metadata.get('location', 'unknown')}"
|
|
vars.bw_groups = [ "${'", "'.join(sorted({group.name for group in monitored_node.groups}))}" ]
|
|
vars.notification.sms = ${str(monitored_node.metadata.get('icinga_options/vars.notification.sms', True)).lower()}
|
|
vars.notification.mail = true
|
|
}
|
|
% endfor
|
|
|
|
apply Dependency "disable-service-checks-on-host-down" to Service {
|
|
disable_checks = true
|
|
ignore_soft_states = true
|
|
assign where true
|
|
}
|