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:
4325ec9
)
The database name is not always available (e.g. check_checkpoint)
author
Greg Sabino Mullane
<
[email protected]
>
Mon, 4 Jul 2011 18:44:42 +0000
(14:44 -0400)
committer
Greg Sabino Mullane
<
[email protected]
>
Mon, 4 Jul 2011 18:44:42 +0000
(14:44 -0400)
check_postgres.pl
patch
|
blob
|
blame
|
history
diff --git
a/check_postgres.pl
b/check_postgres.pl
index 3be87c1ae7e09aec995dc6bf30c74703809e4dd1..740f635d93671907deae26ea712d88e88acd293d 100755
(executable)
--- a/
check_postgres.pl
+++ b/
check_postgres.pl
@@
-1338,7
+1338,7
@@
sub add_response {
}
my $dbservice = $db->{dbservice};
- my $dbname =
qq{DB "$db->{dbname}"}
;
+ my $dbname =
defined $db->{dbname} ? qq{DB "$db->{dbname}"} : ''
;
my $dbhost = (!$db->{host} or $db->{host} eq '<none>') ? '' : qq{ (host:$db->{host})};
my $dbport = defined $db->{port} ? ($db->{port} eq $opt{defaultport} ? '' : qq{ (port=$db->{port}) }) : '';