bundlewrap/bundles/icinga2/files/icinga2/downtimes.conf
Franzi 35abb92daf
All checks were successful
bundlewrap/pipeline/head This commit looks good
bundles/icinga2: do not schedule downtimes for hosts which do not do unattended-upgrades
2021-01-16 22:31:51 +01:00

19 lines
543 B
Plaintext

% for monitored_node in sorted(monitored_nodes):
% if monitored_node.has_bundle('apt'):
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', {}).get('unattended_upgrades', {}).get('day', 5)]}" = "01:${monitored_node.magic_number%30}-01:${(monitored_node.magic_number%30)+30}"
}
child_options = "DowntimeTriggeredChildren"
}
% endif
% endfor