bundles/backups-server: read backup snapshot info from file instead of asking zfs every time
This commit is contained in:
parent
22263eaf6f
commit
a7a59fd690
4 changed files with 56 additions and 19 deletions
|
@ -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'],
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue