[check_postgres] [commit] Don't show totaltime if not available.
check_postgres at bucardo.org
check_postgres at bucardo.org
Wed Oct 22 03:54:06 UTC 2008
Committed by Greg Sabino Mullane <greg at endpoint.com>
Don't show totaltime if not available.
---
check_postgres.pl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/check_postgres.pl b/check_postgres.pl
index 629de5b..9c6b453 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -354,7 +354,7 @@ sub add_response {
$db->{host} eq '<none>' ? '' : qq{(host:$db->{host}) },
$db->{port} eq $DEF_PGPORT ? '' : qq{(port=$db->{port}) };
$header =~ s/\s+$//;
- my $perf = $opt{showtime} ? "time=$db->{totaltime}" : '';
+ my $perf = ($opt{showtime} and $db->{totaltime}) ? "time=$db->{totaltime}" : '';
if ($db->{perf}) {
$perf .= " $db->{perf}";
}
--
1.5.5.4
More information about the Check_postgres
mailing list