[check_postgres] [commit] Squirrel away old value before verify
call.
check_postgres at bucardo.org
check_postgres at bucardo.org
Tue Sep 30 17:19:45 UTC 2008
Committed by Greg Sabino Mullane <greg at endpoint.com>
Squirrel away old value before verify call.
---
check_postgres.pl | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/check_postgres.pl b/check_postgres.pl
index 2a7ed15..f0a69fc 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -981,9 +981,12 @@ sub run_command {
## If we were provided with a regex, check and bail if it fails
elsif ($arg->{regex}) {
if ($db->{slurp} !~ $arg->{regex}) {
- ## Check if problem is due to backend being to old for this check
+ my $oldslurp = $db->{slurp};
+
+ ## Check if problem is due to backend being too old for this check
verify_version($db->{slurp});
+ $db->{slurp} = $oldslurp;
add_unknown qq{T-BAD-QUERY $db->{slurp}};
## Remove it from the returned hash
pop @{$info->{db}};
--
1.5.5.4
More information about the Check_postgres
mailing list