bundles/icinga2: add automatic downtime for upgrade-and-reboot
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
3a56b0425c
commit
12ce8d8f6e
2 changed files with 43 additions and 0 deletions
18
bundles/icinga2/files/icinga2/downtimes.conf
Normal file
18
bundles/icinga2/files/icinga2/downtimes.conf
Normal file
|
@ -0,0 +1,18 @@
|
|||
% 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', {}).get('unattended_upgrades', {}).get('day', 5)]}" = "01:${monitored_node.magic_number%30}-01:${(monitored_node.magic_number%30)+30}"
|
||||
}
|
||||
|
||||
child_options = "DowntimeTriggeredChildren"
|
||||
}
|
||||
% endif
|
||||
% endfor
|
Loading…
Add table
Add a link
Reference in a new issue