bundlewrap/bundles/icinga2/files/icinga2/groups.conf
2021-12-04 20:07:36 +01:00

35 lines
901 B
Text

% for group in sorted(repo.groups):
object HostGroup "group-${group.name}" {
display_name = "bw group ${group.name}"
assign where "${group.name}" in host.vars.bw_groups
}
% endfor
% for bundle in sorted(bundles):
object ServiceGroup "bundle-${bundle}" {
display_name = "bw bundle ${bundle}"
assign where service.vars.bundle == "${bundle}"
}
% endfor
object ServiceGroup "checks_with_mail" {
display_name = "Checks which send E-Mails"
assign where service.vars.notification.mail == true
ignore where host.vars.notification.mail == false
}
object HostGroup "checks_with_sms" {
display_name = "Hosts which send SMS"
assign where host.vars.notification.sms == true
}
object ServiceGroup "checks_with_sms" {
display_name = "Checks which send SMS"
assign where service.vars.notification.sms == true
ignore where host.vars.notification.sms == false
}