From f1d8d19cdfd02c4bc6e26f8572b8f1194083c941 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sat, 10 Mar 2012 20:47:03 +0100 Subject: [PATCH] dsa-check-udldap-freshness: check new last_update.trace instead of /var/lib/misc/thishost/passwd.{db,tdb}. --- .../checks/dsa-check-udldap-freshness | 23 ++++++++----------- dsa-nagios-checks/debian/changelog | 4 +++- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/dsa-nagios-checks/checks/dsa-check-udldap-freshness b/dsa-nagios-checks/checks/dsa-check-udldap-freshness index 6022746..e67abaf 100755 --- a/dsa-nagios-checks/checks/dsa-check-udldap-freshness +++ b/dsa-nagios-checks/checks/dsa-check-udldap-freshness @@ -9,8 +9,6 @@ my %CODE = ( 'UNKNOWN' => 3 ); -my $f; - $SIG{__DIE__ } = sub() { print shift; exit $CODE{'UNKNOWN'}; @@ -36,19 +34,18 @@ sub check_age { }; my @msg; -for $f (qw{/var/lib/misc/thishost/passwd.tdb /var/lib/misc/passwd.db}) { - unless (-e $f) { - print "WARNING: $f does not exist.\n"; - exit $CODE{'WARNING'}; - }; +my $f = "/var/lib/misc/thishost/last_update.trace"; +unless (-e $f) { + print "WARNING: $f does not exist.\n"; + exit $CODE{'WARNING'}; +}; - my $a = check_age($f); - if ($a->[0] != 0) { - print $a->[1], "\n"; - exit $a->[0]; - }; - push @msg, $a->[1]; +my $a = check_age($f); +if ($a->[0] != 0) { + print $a->[1], "\n"; + exit $a->[0]; }; +push @msg, $a->[1]; print "OK: ", join(', ', @msg), "\n"; exit 0; diff --git a/dsa-nagios-checks/debian/changelog b/dsa-nagios-checks/debian/changelog index e061f36..c533193 100644 --- a/dsa-nagios-checks/debian/changelog +++ b/dsa-nagios-checks/debian/changelog @@ -8,8 +8,10 @@ dsa-nagios-checks (9X) Xnstable; urgency=low * dsa-check-msa-eventlog: Add --verbose switch to show info level event log entries. * add dsa-check-crl-expire. + * dsa-check-udldap-freshness: check new last_update.trace instead + of /var/lib/misc/thishost/passwd.{db,tdb}. - -- Peter Palfrader Wed, 07 Mar 2012 15:25:29 +0100 + -- Peter Palfrader Sat, 10 Mar 2012 20:46:35 +0100 dsa-nagios-checks (92.1) unstable; urgency=low -- 2.20.1