projects
/
mirror
/
dsa-nagios.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
barriere on wheezy
[mirror/dsa-nagios.git]
/
dsa-nagios-checks
/
checks
/
dsa-check-bacula
diff --git
a/dsa-nagios-checks/checks/dsa-check-bacula
b/dsa-nagios-checks/checks/dsa-check-bacula
index
35aade9
..
5f5e445
100755
(executable)
--- a/
dsa-nagios-checks/checks/dsa-check-bacula
+++ b/
dsa-nagios-checks/checks/dsa-check-bacula
@@
-102,7
+102,7
@@
conn = psycopg2.connect(options.db)
cursor = conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
cursor.execute(query, params)
records = cursor.fetchall()
cursor = conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
cursor.execute(query, params)
records = cursor.fetchall()
-if len(records) == 0:
+if len(records) == 0
or records[0][0] is None
:
print "CRITICAL: No backups of %s/%s."%(host, level)
sys.exit(codes['CRITICAL'])
elif len(records) > 1:
print "CRITICAL: No backups of %s/%s."%(host, level)
sys.exit(codes['CRITICAL'])
elif len(records) > 1: