diff options
author | Greg Sabino Mullane | 2011-07-04 18:44:42 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2011-07-04 18:44:42 +0000 |
commit | f64d44f49ac06411a136db1177edbbdd71538495 (patch) | |
tree | 0948bc20249a7fc107c51a5d0aa876323ec05e86 /check_postgres.pl | |
parent | 4325ec907dccd33ef49f23a558791cc6e7a7e0c4 (diff) |
The database name is not always available (e.g. check_checkpoint)
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index 3be87c1ae..740f635d9 100755 --- 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}) }) : ''; |