Fix MRTG for last_vacuum and last_analzye
authorGreg Sabino Mullane <[email protected]>
Sat, 12 Feb 2011 04:56:08 +0000 (23:56 -0500)
committerGreg Sabino Mullane <[email protected]>
Sat, 12 Feb 2011 04:56:08 +0000 (23:56 -0500)
check_postgres.pl
t/02_last_vacuum.t

index 319dff3d1c6bb42211a3bde1e6a5f7274893c832..f1b66b1e4a4a9e2108a7d2b3f7ea9f8a8edbaecf 100755 (executable)
@@ -4092,8 +4092,7 @@ FROM (SELECT nspname, relname, $criteria AS v
             }
         }
         if ($MRTG) {
-            $stats{$db->{dbname}} = $mintime;
-            $statsmsg{$db->{dbname}} = msg('vac-msg', $db->{dbname}, $minrel);
+            do_mrtg({one => $mintime});
             return;
         }
         if ($maxtime == -2) {
index f74b6af1ef9ab2216fb3f663c360d2e5bb0d5356..9266e35ffd1fd42b9d2698f1df48a8fe75654bb9 100644 (file)
@@ -77,11 +77,11 @@ like ($cp->run("-w 0 --exclude=~.* --include=$testtbl"),
 
 $t = qq{$S returns correct MRTG information (OK case)};
 like ($cp->run("--output=mrtg -w 0 --exclude=~.* --include=$testtbl"),
-      qr{\d+\n0\n\nDB: $dbname TABLE: public.$testtbl\n}, $t);
+      qr{\d+\n0\n\n\n}, $t);
 
 $t = qq{$S returns correct MRTG information (fail case)};
 like ($cp->run('--output=mrtg -w 0 --exclude=~.* --include=no_such_table'),
-      qr{0\n0\n\nDB: $dbname TABLE: \?\n}, $t);
+      qr{0\n0\n\n\n}, $t);
 
 }