bundlewrap/bundles/icinga2/files/icinga2/downtimes.conf

18 lines
708 B
Text

% for monitored_node in sorted(monitored_nodes):
% if monitored_node.has_any_bundle(['apt', 'c3voc-addons']):
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')]}" = "${monitored_node.metadata.get('apt/unattended_upgrades/hour')}:${monitored_node.magic_number%30}-${monitored_node.metadata.get('apt/unattended_upgrades/hour')}:${(monitored_node.magic_number%30)+30}"
}
child_options = "DowntimeTriggeredChildren"
}
% endif
% endfor