diff options
author | Greg Sabino Mullane | 2011-02-12 04:53:54 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2011-02-12 04:53:54 +0000 |
commit | 5cf21e2f0bf82f0e17cbf3d3ef75c5ae79be4c8d (patch) | |
tree | e5ee99583b6bbb175b6549f04253861fd0e25abe /check_postgres.pl | |
parent | 8fc9ebe721ce10cde9b798c3ecd5bd429b4a105e (diff) |
Give the correct message when there are non-excluded tables mixed with excluded
ones in the last_vacuum and analzye actions. Per complaint and
solution provided by David E. Wheeler.
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index 8e8ac0b61..319dff3d1 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -4066,13 +4066,14 @@ FROM (SELECT nspname, relname, $criteria AS v my ($minrel,$maxrel) = ('?','?'); ## no critic my $mintime = 0; ## used for MRTG only my $count = 0; + my $found = 0; ROW: for my $r (@{$db->{slurp}}) { my ($dbname,$schema,$name,$time,$ptime) = @$r{qw/ datname sname tname ltime ptime/}; - $maxtime = -3 if $maxtime == -1; if (skip_item($name, $schema)) { $maxtime = -2 if $maxtime < 1; next ROW; } + $found++; if ($time >= 0) { $db->{perf} .= sprintf ' %s=%ss;%s;%s', perfname("$dbname.$schema.$name"),$time, $warning, $critical; @@ -4095,9 +4096,8 @@ FROM (SELECT nspname, relname, $criteria AS v $statsmsg{$db->{dbname}} = msg('vac-msg', $db->{dbname}, $minrel); return; } - if ($maxtime == -2) { - add_unknown msg('no-match-table'); + add_unknown msg($found ? $type eq 'vacuum' ? 'vac-nomatch-v' : 'vac-nomatch-a' : 'no-match-table'); } elsif ($maxtime < 0) { add_unknown $type eq 'vacuum' ? msg('vac-nomatch-v') : msg('vac-nomatch-a'); |