From 00dcadc439e4e6ac239b5c3640825a809fa7725a Mon Sep 17 00:00:00 2001 From: Marco Nenciarini Date: Tue, 12 Aug 2014 10:27:17 +0200 Subject: [PATCH] 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) --- check_postgres.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 =~ //) { + if ($st =~ /disabled/o or $cq =~ //) { add_unknown msg('psa-disabled'); return; } -- 2.30.2