bundlewrap/bundles/icinga2/files/icinga2/downtimes.conf
Franzi b06532241b
All checks were successful
bundlewrap/pipeline/head This commit looks good
bundles: use metastack syntax for metadata.get()
2021-02-18 18:12:25 +01:00

19 lines
529 B
Plaintext

% for monitored_node in sorted(monitored_nodes):
% if not monitored_node.dummy:
object ScheduledDowntime "unattended_upgrades" {
host_name = "${monitored_node.name}"
author = "upgrade-and-reboot"
comment = "Downtime for upgrade-and-reboot"
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