summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Sabino Mullane2011-02-12 04:56:08 +0000
committerGreg Sabino Mullane2011-02-12 04:56:08 +0000
commitd3fe0b3227b007aa00c4e79ca74016dc49e3a637 (patch)
tree8fe41fef3ef1a0181cdda95557a0b14876032162
parent5cf21e2f0bf82f0e17cbf3d3ef75c5ae79be4c8d (diff)
Fix MRTG for last_vacuum and last_analzye
-rwxr-xr-xcheck_postgres.pl3
-rw-r--r--t/02_last_vacuum.t4
2 files changed, 3 insertions, 4 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index 319dff3d1..f1b66b1e4 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -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) {
diff --git a/t/02_last_vacuum.t b/t/02_last_vacuum.t
index f74b6af1e..9266e35ff 100644
--- a/t/02_last_vacuum.t
+++ b/t/02_last_vacuum.t
@@ -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);
}