projects
/
mirror
/
dsa-nagios.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a contact for the Release Team's britney role account
[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
13e935e
..
ce6a9a0
100755
(executable)
--- a/
dsa-nagios-checks/checks/dsa-check-backuppg
+++ b/
dsa-nagios-checks/checks/dsa-check-backuppg
@@
-1,4
+1,4
@@
-#!/usr/bin/python
+#!/usr/bin/python
3
# Copyright 2010 Peter Palfrader
#
# Copyright 2010 Peter Palfrader
#
@@
-102,10
+102,7
@@
def wal_pre(w, host, db):
(w1,w2) = w
if w2 == 0:
w1 -= 1
(w1,w2) = w
if w2 == 0:
w1 -= 1
- if (host,db) in ( ('main'), ):
- w2 = 0xFE
- else:
- w2 = 0xFF
+ w2 = 0xFF
else:
w2 -= 1
else:
w2 -= 1
@@
-162,7
+159,7
@@
config = load_conf(options.conffile)
os.chdir(config['rootdir'])
for dir in os.listdir('.'):
os.chdir(config['rootdir'])
for dir in os.listdir('.'):
- if dir.startswith('.') or dir.endswith('.old'):
+ if dir.startswith('.') or dir.endswith('.old')
or dir == 'lost+found'
:
note_info('IGNORED', dir)
continue
note_info('IGNORED', dir)
continue
@@
-364,21
+361,21
@@
for dir in os.listdir('.'):
for p in problems_seq:
for p in problems_seq:
- print
p
+ print
(p)
if options.verbose:
for p in notices_seq:
if options.verbose:
for p in notices_seq:
- print
p
+ print
(p)
if options.expire:
for f in global_expires:
if options.expire:
for f in global_expires:
- if options.verbose: print
"Expiring %s"%(
f)
+ if options.verbose: print
("Expiring %s" %
f)
if not options.dry_run: os.unlink(f)
if len(problems_seq) > 0:
sys.exit(1)
if not options.expire or options.verbose:
if not options.dry_run: os.unlink(f)
if len(problems_seq) > 0:
sys.exit(1)
if not options.expire or options.verbose:
- print
"OK: no problems detected"
+ print
("OK: no problems detected")
sys.exit(0)
# vim:set et:
sys.exit(0)
# vim:set et: