]> git.michaelhowe.org Git - packages/a/afs-monitor.git/commitdiff
Report database version on ubik okay
authorRuss Allbery <rra@stanford.edu>
Thu, 21 Oct 2010 20:24:23 +0000 (13:24 -0700)
committerRuss Allbery <rra@stanford.edu>
Thu, 21 Oct 2010 20:24:23 +0000 (13:24 -0700)
Report the database version as extra information in check_udebug if
there are no errors or warnings.

NEWS
check_udebug

diff --git a/NEWS b/NEWS
index 6ea5d4d1509985987ddebca7d324299071be2b02..fc714f1d40105225a5c451b00c71ec147c33a0dc 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -32,3 +32,6 @@ afs-monitor 2.0 (unreleased)
 
     Look for rxdebug in /usr/sbin and /usr/local/sbin since OpenAFS
     installs it into sbindir by default.
+
+    Report the database version as extra information in check_udebug if
+    there are no errors or warnings.
index a486eb8fe808118cd62a81eb1640736934c73a79..c8df33692a44090dbfa0a14a5a3ebd24f08b2f3c 100755 (executable)
@@ -85,11 +85,14 @@ unless (open (UDEBUG, "$UDEBUG $host $port |")) {
     warn "$0: cannot run udebug\n";
     exit 3;
 }
-my ($issync, $recovery, $synchost);
+my ($issync, $recovery, $synchost, $db);
 while (<UDEBUG>) {
     $issync = 1 if /^I am sync site /;
     $recovery = 1 if /^Recovery state 1f/;
     $synchost = 1 if /^Sync host \d+(\.\d+){3} was set /;
+    if (/Local db version is (\d+\.\d+)/) {
+        $db = "db version $1";
+    }
 }
 close UDEBUG;
 if ($? != 0) {
@@ -105,7 +108,7 @@ if ($issync && !$recovery) {
     print "UBIK CRITICAL - no sync site\n";
     exit 2;
 } else {
-    print "UBIK OK\n";
+    print "UBIK OK - $db\n";
     exit 0;
 }