bundles/backup-client: add check for last backup of specific client
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
fa2f12375c
commit
35104cb8ce
3 changed files with 76 additions and 1 deletions
|
@ -104,7 +104,6 @@ def zfs_pool(metadata):
|
|||
}
|
||||
|
||||
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'zfs/datasets',
|
||||
'zfs/snapshots/snapshot_never',
|
||||
|
@ -131,3 +130,23 @@ def zfs_datasets_and_snapshots(metadata):
|
|||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'icinga2_api/backup-server/services',
|
||||
)
|
||||
def monitoring(metadata):
|
||||
services = {}
|
||||
|
||||
for client in metadata.get('backup-server/clients', {}).keys():
|
||||
services[f'BACKUPS FOR NODE {client}'] = {
|
||||
'command_on_monitored_host': f'sudo /usr/local/share/icinga/plugins/check_backup_for_node {client}',
|
||||
}
|
||||
|
||||
return {
|
||||
'icinga2_api': {
|
||||
'backup-server': {
|
||||
'services': services,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue