[check_postgres] [commit] Force query_runtime output to normal non-exponential numbers.

check_postgres at bucardo.org check_postgres at bucardo.org
Tue Apr 28 17:06:03 UTC 2009


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

Force query_runtime output to normal non-exponential numbers.
Thanks to Josh Tolley for finding.

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

diff --git a/check_postgres.pl b/check_postgres.pl
index 8581d35..3855cdc 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -3519,7 +3519,7 @@ sub check_query_runtime {
 			add_unknown msg('invalid-query', $db->{slurp});
 			next;
 		}
-		my $totalseconds = $1 / 1000.0;
+		my $totalseconds = sprintf '%.2f', $1 / 1000.0;
 		if ($MRTG) {
 			$stats{$db->{dbname}} = $totalseconds;
 			next;
-- 
1.6.0.5



More information about the Check_postgres mailing list