From 70d9558e028b41e303981621ab0eff46f1f7a25c Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Thu, 23 May 2013 08:57:45 +0200 Subject: [PATCH] dsa-check-bacula: exit status fix --- dsa-nagios-checks/checks/dsa-check-bacula | 6 +++--- dsa-nagios-checks/debian/changelog | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dsa-nagios-checks/checks/dsa-check-bacula b/dsa-nagios-checks/checks/dsa-check-bacula index 5f5e445..2d6c34d 100755 --- a/dsa-nagios-checks/checks/dsa-check-bacula +++ b/dsa-nagios-checks/checks/dsa-check-bacula @@ -31,8 +31,8 @@ import sys codes = { 'UNKNOWN': 3, - 'CRITICAL': 1, - 'WARNING': 2, + 'CRITICAL': 2, + 'WARNING': 1, 'OK': 0 } @@ -113,7 +113,7 @@ elif records[0]['age'] > options.critical: sys.exit(codes['CRITICAL']) elif records[0]['age'] > options.warn: print "WARN: Last backup of %s/%s is %.2f days old."%(host, level, float(records[0]['age'])/3600/24) - sys.exit(codes['WARN']) + sys.exit(codes['WARNING']) else: print "OK: Last backup of %s/%s is %.2f days old."%(host, level, float(records[0]['age'])/3600/24) sys.exit(codes['OK']) diff --git a/dsa-nagios-checks/debian/changelog b/dsa-nagios-checks/debian/changelog index 143420f..3d54a53 100644 --- a/dsa-nagios-checks/debian/changelog +++ b/dsa-nagios-checks/debian/changelog @@ -3,6 +3,7 @@ dsa-nagios-checks (96) UNRELEASED; urgency=low * dsa-check-zone-rrsig-expiration, dsa-check-zone-rrsig-expiration-many: Allow supplying the nameservers to start recursion at (per zone). This is useful for reverse zones of RFC1918 space. + * dsa-check-bacula: exit status fix. -- Peter Palfrader Tue, 23 Apr 2013 20:12:09 +0200 -- 2.20.1