projects
/
mirror
/
dsa-nagios.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
arm-arm-01 on stretch
[mirror/dsa-nagios.git]
/
dsa-nagios-checks
/
checks
/
dsa-check-backuppg
diff --git
a/dsa-nagios-checks/checks/dsa-check-backuppg
b/dsa-nagios-checks/checks/dsa-check-backuppg
index
e8a8592
..
14baf58
100755
(executable)
--- a/
dsa-nagios-checks/checks/dsa-check-backuppg
+++ b/
dsa-nagios-checks/checks/dsa-check-backuppg
@@
-173,7
+173,7
@@
for dir in os.listdir('.'):
files.sort()
files.sort()
-
unhandled_backup
s = copy.copy(config['backups'][dir])
+
notyetseen_db
s = copy.copy(config['backups'][dir])
ignored_dbs = {}
backup_state = {}
ignored_dbs = {}
backup_state = {}
@@
-246,6
+246,7
@@
for dir in os.listdir('.'):
else:
note_warning_db(dir, db, 'MISSING-BASE', basefn)
continue
else:
note_warning_db(dir, db, 'MISSING-BASE', basefn)
continue
+ if db in notyetseen_dbs: del notyetseen_dbs[db]
files.remove(basefn)
if backup_state[db]['can_expire_next']:
backup_state[db]['expires'].append(baseffn)
files.remove(basefn)
if backup_state[db]['can_expire_next']:
backup_state[db]['expires'].append(baseffn)
@@
-327,6
+328,9
@@
for dir in os.listdir('.'):
for f in backup_state[db]['expires']:
global_expires.append(f)
for f in backup_state[db]['expires']:
global_expires.append(f)
+ for db in notyetseen_dbs:
+ note_warning_db(dir, db, 'NO-BACKUP', 'no backups! (no .backup files found)')
+
#if not db in backup_state:
# note_warning('BASE-WITHOUT-WAL', ffn)
# ignored_dbs[db] = True
#if not db in backup_state:
# note_warning('BASE-WITHOUT-WAL', ffn)
# ignored_dbs[db] = True