From d3fe0b3227b007aa00c4e79ca74016dc49e3a637 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Fri, 11 Feb 2011 23:56:08 -0500 Subject: [PATCH] Fix MRTG for last_vacuum and last_analzye --- check_postgres.pl | 3 +-- t/02_last_vacuum.t | 4 ++-- 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); } -- 2.30.2