Compare commits
3 commits
5acfd4e657
...
583a5ca594
Author | SHA1 | Date | |
---|---|---|---|
583a5ca594 | |||
b20e729298 | |||
c535ce24a4 |
3 changed files with 6 additions and 2 deletions
|
@ -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'),
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
|
@ -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}',
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue