bundlewrap/bundles/icinga2/files/icinga2/downtimes.conf
Franziska Kunsmann ebb6d287b2
All checks were successful
bundlewrap/pipeline/head This commit looks good
bundles/icinga2: add node name to automatic downtime comment
2021-04-23 14:30:34 +02:00

18 lines
561 B
Text

% for monitored_node in sorted(monitored_nodes):
% if not monitored_node.dummy:
object ScheduledDowntime "unattended_upgrades" {
host_name = "${monitored_node.name}"
author = "unattended-upgrades"
comment = "Downtime for upgrade-and-reboot of node ${monitored_node.name}"
fixed = true
ranges = {
"${days[monitored_node.metadata.get('apt/unattended_upgrades/day', 5)]}" = "01:${monitored_node.magic_number%30}-01:${(monitored_node.magic_number%30)+30}"
}
child_options = "DowntimeTriggeredChildren"
}
% endif
% endfor