summaryrefslogtreecommitdiff
path: root/check_postgres.pl
diff options
context:
space:
mode:
authorAndy Lester2010-03-05 22:32:28 +0000
committerAndy Lester2010-03-05 22:32:28 +0000
commit6bd83bad13bd3b57629dc0103b0039b683102534 (patch)
tree215fd7fe508a3061fecb5501fcaa9c50b17a68bf /check_postgres.pl
parent3a103ae6350190e792477de52e2c667ff5203d6b (diff)
Added some temporary variables so vim's syntax highlighting doesn't freak
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-xcheck_postgres.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index 4a8d4b4af..f9d4d7521 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -1051,9 +1051,11 @@ sub add_response {
push @{$type->{''}} => [$msg, length $nohost > 1 ? $nohost : ''];
return;
}
+ my $dbservice = $db->{dbservice};
+ my $dbname = $db->{dbname};
my $header = sprintf q{%s%s%s},
- $action_info->{$action}[0] ? '' : (defined $db->{dbservice} and length $db->{dbservice}) ?
- qq{service=$db->{dbservice} } : qq{DB "$db->{dbname}" },
+ $action_info->{$action}[0] ? '' : (defined $dbservice and length $dbservice) ?
+ qq{service=$dbservice } : qq{DB "$dbname" },
$db->{host} eq '<none>' ? '' : qq{(host:$db->{host}) },
defined $db->{port} ? ($db->{port} eq $opt{defaultport} ? '' : qq{(port=$db->{port}) }) : '';
$header =~ s/\s+$//;