summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Nenciarini2014-08-12 08:27:17 +0000
committerChristoph Berg2016-05-26 15:58:58 +0000
commit00dcadc439e4e6ac239b5c3640825a809fa7725a (patch)
treee2b70c3ca6221200e4cc0506879b729bb71a6c4e
parentcce3b95218899d2a71f9f6d5f55cafaca846380d (diff)
Don't fail when query contains 'disabled' word
If a query contains the disabled word (.e.g. select 1 as disabled) "check_postgres.pl --action txn_idle" exits with ```UNKNOWN: No queries - is stats_command_string or track_activities off?``` If you set track_activities to off, the status field contains 'disabled' (at least on 9.3)
-rwxr-xr-xcheck_postgres.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index 2dc16b6c4..e0950f420 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -7928,7 +7928,7 @@ sub check_txn_idle {
}
## Return unknown if stats_command_string / track_activities is off
- if ($cq =~ /disabled/o or $cq =~ /<command string not enabled>/) {
+ if ($st =~ /disabled/o or $cq =~ /<command string not enabled>/) {
add_unknown msg('psa-disabled');
return;
}