bundles/icinga2: introduce icinga_options/downtime_also_for
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
6a88040826
commit
4d5e75df68
2 changed files with 23 additions and 0 deletions
|
@ -14,5 +14,21 @@ object ScheduledDowntime "unattended_upgrades" {
|
|||
|
||||
child_options = "DowntimeTriggeredChildren"
|
||||
}
|
||||
% for also_host in sorted(monitored_node.metadata.get('icinga_options/downtime_also_for', set())):
|
||||
object ScheduledDowntime "unattended_upgrades_also_for_${also_host}" {
|
||||
host_name = "${repo.get_node(also_host).name}"
|
||||
|
||||
author = "upgrade-and-reboot"
|
||||
comment = "Downtime for upgrade-and-reboot of ${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"
|
||||
}
|
||||
% endfor
|
||||
% endif
|
||||
% endfor
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue