projects
/
check_postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fa9878
)
Quick fix for cases when client_port is set to an empty string, per bug report 79...
author
Greg Sabino Mullane
<
[email protected]
>
Wed, 22 Jun 2011 16:02:58 +0000
(12:02 -0400)
committer
Greg Sabino Mullane
<
[email protected]
>
Wed, 22 Jun 2011 16:02:58 +0000
(12:02 -0400)
check_postgres.pl
patch
|
blob
|
blame
|
history
diff --git
a/check_postgres.pl
b/check_postgres.pl
index 438f0f4b71a50ee76f336c1f2833d51b365b4dc0..e9c499939c186c143c86cf9540f10421d10cc38d 100755
(executable)
--- a/
check_postgres.pl
+++ b/
check_postgres.pl
@@
-7405,7
+7405,8
@@
sub check_txn_idle {
msg('database'), $maxr->{datname},
msg('username'), $maxr->{usename},
$maxr->{client_addr} eq '' ? '' : (sprintf ' %s:%s', msg('address'), $maxr->{client_addr}),
- $maxr->{client_port} < 1 ? '' : (sprintf ' %s:%s', msg('port'), $maxr->{client_port});
+ ($maxr->{client_port} eq '' or $maxr->{client_port} < 1)
+ ? '' : (sprintf ' %s:%s', msg('port'), $maxr->{client_port});
}
## For MRTG, we can simply exit right now