bundles/backups-server: read backup snapshot info from file instead of asking zfs every time

This commit is contained in:
Franzi 2025-02-14 21:25:10 +01:00
parent 22263eaf6f
commit a7a59fd690
Signed by: kunsi
GPG key ID: 12E3D2136B818350
4 changed files with 56 additions and 19 deletions

View file

@ -10,6 +10,14 @@ defaults = {
'c-*',
},
},
'systemd-timers': {
'timers': {
'check_backup_for_node-cron': {
'command': '/usr/local/share/icinga/plugins/check_backup_for_node-cron',
'when': '*-*-* *:00/5:00', # every five minutes
}
},
},
'zfs': {
# The whole point of doing backups is to keep them for a long
# time, which eliminates the need for this check.
@ -183,7 +191,7 @@ def monitoring(metadata):
continue
services[f'BACKUPS FOR NODE {client}'] = {
'command_on_monitored_host': 'sudo /usr/local/share/icinga/plugins/check_backup_for_node {} {}'.format(
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_backup_for_node {} {}'.format(
client,
config['one_backup_every_hours'],
),