projects
/
mirror
/
dsa-nagios.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
69ac693
)
dsa-check-backuppg: allow specifying which timeline we expect a database to be on
author
Peter Palfrader
<peter@palfrader.org>
Sun, 17 Jan 2016 17:47:40 +0000
(18:47 +0100)
committer
Peter Palfrader
<peter@palfrader.org>
Sun, 17 Jan 2016 17:47:40 +0000
(18:47 +0100)
dsa-nagios-checks/checks/dsa-check-backuppg
patch
|
blob
|
history
dsa-nagios-checks/debian/changelog
patch
|
blob
|
history
dsa-nagios-checks/etc/dsa-check-backuppg.conf.sample
patch
|
blob
|
history
diff --git
a/dsa-nagios-checks/checks/dsa-check-backuppg
b/dsa-nagios-checks/checks/dsa-check-backuppg
index
10d0033
..
e8a8592
100755
(executable)
--- a/
dsa-nagios-checks/checks/dsa-check-backuppg
+++ b/
dsa-nagios-checks/checks/dsa-check-backuppg
@@
-195,7
+195,7
@@
for dir in os.listdir('.'):
continue
(db, type) = r.groups(1)
continue
(db, type) = r.groups(1)
- if not isinstance(config['backups'][dir],
lis
t) or not db in config['backups'][dir]:
+ if not isinstance(config['backups'][dir],
dic
t) or not db in config['backups'][dir]:
if not db in ignored_dbs:
note_warning_db(dir, db, 'NOT-CONFIGURED', '%s/%s'%(dir, db))
ignored_dbs[db] = True
if not db in ignored_dbs:
note_warning_db(dir, db, 'NOT-CONFIGURED', '%s/%s'%(dir, db))
ignored_dbs[db] = True
@@
-211,6
+211,10
@@
for dir in os.listdir('.'):
# can_expire_next: Can expire all files that we handle from now on
backup_state[db]['can_expire_next'] = False
backup_state[db]['expires'] = []
# can_expire_next: Can expire all files that we handle from now on
backup_state[db]['can_expire_next'] = False
backup_state[db]['expires'] = []
+ if isinstance(config['backups'][dir][db], dict) and 'timeline' in config['backups'][dir][db]:
+ backup_state[db]['timeline'] = config['backups'][dir][db]['timeline']
+ else:
+ backup_state[db]['timeline'] = 1
# Apparently we already have seen a base backup and all its wal files
# which we want to keep, so everything what we see now is older than
# Apparently we already have seen a base backup and all its wal files
# which we want to keep, so everything what we see now is older than
@@
-273,8
+277,8
@@
for dir in os.listdir('.'):
backup_state[db]['can_expire_next'] = True
(timeline, wal1, wal2) = map(lambda x: int(x,16), r.groups())
backup_state[db]['can_expire_next'] = True
(timeline, wal1, wal2) = map(lambda x: int(x,16), r.groups())
- if not timeline ==
1
:
- note_warning_db(dir, db, '
CANNOT-HANDLE-TIMELINES_NOT_1
', ffn)
+ if not timeline ==
backup_state[db]['timeline']
:
+ note_warning_db(dir, db, '
UNEXPECTED-TIMELINE
', ffn)
continue
thissegment = (wal1, wal2)
continue
thissegment = (wal1, wal2)
diff --git
a/dsa-nagios-checks/debian/changelog
b/dsa-nagios-checks/debian/changelog
index
73bb3ae
..
fb85907
100644
(file)
--- a/
dsa-nagios-checks/debian/changelog
+++ b/
dsa-nagios-checks/debian/changelog
@@
-13,6
+13,8
@@
dsa-nagios-checks (108+XXXX) UNRELEASED; urgency=medium
* dsa-check-libs: accept -v as short for --verbose.
* dsa-check-libs: ignore deleted CWDs.
* dsa-check-drbd: Add --ok-no-devices option.
* dsa-check-libs: accept -v as short for --verbose.
* dsa-check-libs: ignore deleted CWDs.
* dsa-check-drbd: Add --ok-no-devices option.
+ * dsa-check-backuppg: allow specifying which timeline we expect a database
+ to be on.
[ Tollef Fog Heen ]
* dsa-update-unowned-file-status: ignore fdescfs, used for /dev/fd on
[ Tollef Fog Heen ]
* dsa-update-unowned-file-status: ignore fdescfs, used for /dev/fd on
@@
-25,7
+27,7
@@
dsa-nagios-checks (108+XXXX) UNRELEASED; urgency=medium
* Add dsa-check-hpssacli, replaces hpacucli for new hosts.
* dsa-check-hpssacli: accept 12.0Gbps as transfer speed for SAS
* Add dsa-check-hpssacli, replaces hpacucli for new hosts.
* dsa-check-hpssacli: accept 12.0Gbps as transfer speed for SAS
- -- Peter Palfrader <weasel@debian.org>
Mon, 21 Dec 2015 10:40:57
+0100
+ -- Peter Palfrader <weasel@debian.org>
Sun, 17 Jan 2016 18:47:12
+0100
dsa-nagios-checks (108) unstable; urgency=medium
dsa-nagios-checks (108) unstable; urgency=medium
diff --git
a/dsa-nagios-checks/etc/dsa-check-backuppg.conf.sample
b/dsa-nagios-checks/etc/dsa-check-backuppg.conf.sample
index
4b50f82
..
1f5eb2a
100644
(file)
--- a/
dsa-nagios-checks/etc/dsa-check-backuppg.conf.sample
+++ b/
dsa-nagios-checks/etc/dsa-check-backuppg.conf.sample
@@
-6,10
+6,11
@@
warn-age:
retention: 1814400
backups:
stabile:
retention: 1814400
backups:
stabile:
- - snapshot
+ snapshot:
franck:
franck:
- - dak
+ dak:
grieg:
grieg:
- - wanna-build
+ wanna-build:
+ timeline: 3
sibelius:
sibelius:
- - 2ndsnapshot
+ 2ndsnapshot: