bundles/backup-client: don't monitor backups for nodes which have exclude_from_monitoring

This commit is contained in:
Franzi 2024-02-13 14:24:27 +01:00
parent ac7f73588d
commit 297726f297
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 9 additions and 1 deletions

View file

@ -35,8 +35,15 @@ def get_my_clients(metadata):
continue
my_clients[rnode.name] = {
'user': rnode.metadata.get('backup-client/user-name'),
'exclude_from_monitoring': rnode.metadata.get(
'backup-client/exclude_from_monitoring',
rnode.metadata.get(
'icinga_options/exclude_from_monitoring',
False,
),
),
'one_backup_every_hours': rnode.metadata.get('backup-client/one_backup_every_hours', 24),
'user': rnode.metadata.get('backup-client/user-name'),
'retain': {
'daily': rnode.metadata.get('backups/retain/daily', retain_defaults['daily']),
'weekly': rnode.metadata.get('backups/retain/weekly', retain_defaults['weekly']),

View file

@ -21,6 +21,7 @@ nodes['kunsi-p14s'] = {
'autologin_as': 'kunsi',
},
'backup-client': {
'exclude_from_monitoring': False,
# only alert people if we're missing more than a week of backups
'one_backup_every_hours': 7 * 24,
},