Compare commits

...

3 commits

Author SHA1 Message Date
583a5ca594
htz-hel.backup-kunsi: disable backup check
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good
2022-01-05 22:57:33 +01:00
b20e729298
bundles/backup-server: add option to disable "last backup" check 2022-01-05 22:57:30 +01:00
c535ce24a4
bundles/backup-client: show timezone in backup check 2022-01-05 22:57:26 +01:00
3 changed files with 6 additions and 2 deletions

View file

@ -38,7 +38,7 @@ try:
last_snap = sorted(snaps)[-1] last_snap = sorted(snaps)[-1]
delta = NOW - last_snap delta = NOW - last_snap
print('Last backup was on {}'.format( print('Last backup was on {} UTC'.format(
datetime.fromtimestamp(last_snap).strftime('%Y-%m-%d %H:%M:%S'), datetime.fromtimestamp(last_snap).strftime('%Y-%m-%d %H:%M:%S'),
)) ))

View file

@ -138,7 +138,10 @@ def zfs_datasets_and_snapshots(metadata):
def monitoring(metadata): def monitoring(metadata):
services = {} services = {}
for client in metadata.get('backup-server/clients', {}).keys(): for client, config in metadata.get('backup-server/clients', {}).items():
if config.get('exclude_from_monitoring', False):
continue
services[f'BACKUPS FOR NODE {client}'] = { services[f'BACKUPS FOR NODE {client}'] = {
'command_on_monitored_host': f'sudo /usr/local/share/icinga/plugins/check_backup_for_node {client}', 'command_on_monitored_host': f'sudo /usr/local/share/icinga/plugins/check_backup_for_node {client}',
} }

View file

@ -35,6 +35,7 @@ nodes['htz-hel.backup-kunsi'] = {
'clients': { 'clients': {
'kunsi-t470': { 'kunsi-t470': {
'user': 'kunsi-t470', 'user': 'kunsi-t470',
'exclude_from_monitoring': True,
'retain': { 'retain': {
'daily': 30, 'daily': 30,
'weekly': 6, 'weekly': 6,