[check_postgres] [commit] Loosen up txn_time regex a little

check_postgres at bucardo.org check_postgres at bucardo.org
Fri Oct 3 14:54:57 UTC 2008


Committed by Greg Sabino Mullane <greg at endpoint.com>

Loosen up txn_time regex a little

---
 check_postgres.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/check_postgres.pl b/check_postgres.pl
index 88f382c..8a03c1f 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -2890,7 +2890,7 @@ sub check_txn_time {
 	$SQL = q{SELECT datname, max(COALESCE(ROUND(EXTRACT(epoch FROM now()-xact_start)),0)) }.
 		qq{FROM pg_stat_activity WHERE xact_start IS NOT NULL $USERWHERECLAUSE GROUP BY 1};
 
-	my $info = run_command($SQL, { regex => qr[\s*.+?\s+\|\s+\d+], emptyok => 1 } );
+	my $info = run_command($SQL, { regex => qr[\s+\|\s+\d+], emptyok => 1 } );
 
 	my $found = 0;
 	for $db (@{$info->{db}}) {
-- 
1.5.5.4



More information about the Check_postgres mailing list