From 6314d19db973abe27fabe65716bd221f6ef3c29b Mon Sep 17 00:00:00 2001 From: Quentin Garnier Date: Wed, 4 Mar 2015 17:27:24 +1100 Subject: [PATCH] Refs #6136 --- apps/protocols/http/mode/jsoncontent.pm | 2 +- apps/protocols/http/mode/soapcontent.pm | 2 +- database/postgres/plugin.pm | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/apps/protocols/http/mode/jsoncontent.pm b/apps/protocols/http/mode/jsoncontent.pm index 6205edf95..7bc61476a 100644 --- a/apps/protocols/http/mode/jsoncontent.pm +++ b/apps/protocols/http/mode/jsoncontent.pm @@ -361,7 +361,7 @@ Can be: 'values' (only check numeric values) Threshold warning if the string match -=item B<--critical-numeric> +=item B<--critical-string> Threshold critical if the string match diff --git a/apps/protocols/http/mode/soapcontent.pm b/apps/protocols/http/mode/soapcontent.pm index 067dcd13e..a5213d27c 100644 --- a/apps/protocols/http/mode/soapcontent.pm +++ b/apps/protocols/http/mode/soapcontent.pm @@ -375,7 +375,7 @@ Can be: 'values' (only check numeric values) Threshold warning if the string match -=item B<--critical-numeric> +=item B<--critical-string> Threshold critical if the string match diff --git a/database/postgres/plugin.pm b/database/postgres/plugin.pm index 02ccdb5e8..ce2b066d9 100644 --- a/database/postgres/plugin.pm +++ b/database/postgres/plugin.pm @@ -80,17 +80,13 @@ sub init { @{$self->{sqldefault}->{dbi}} = (); @{$self->{sqldefault}->{psqlcmd}} = (); for (my $i = 0; $i < scalar(@{$options_result->{db_host}}); $i++) { - if (!defined($options_result->{db_name}[$i]) || $options_result->{db_name}[$i] eq '') { - $self->{output}->add_option_msg(short_msg => "Need to specify database argument."); - $self->{output}->option_exit(); - } $self->{sqldefault}->{dbi}[$i] = { data_source => 'Pg:host=' . $options_result->{db_host}[$i] }; $self->{sqldefault}->{psqlcmd}[$i] = { host => $options_result->{db_host}[$i] }; if (defined($options_result->{db_port}[$i])) { $self->{sqldefault}->{dbi}[$i]->{data_source} .= ';port=' . $options_result->{db_port}[$i]; $self->{sqldefault}->{psqlcmd}[$i]->{port} = $options_result->{db_port}[$i]; } - $options_result->{db_name}[$i] = (defined($options_result->{db_name}[$i])) ? $options_result->{db_name}[$i] : 'postgres'; + $options_result->{db_name}[$i] = (defined($options_result->{db_name}[$i]) && $options_result->{db_name}[$i] ne '') ? $options_result->{db_name}[$i] : 'postgres'; $self->{sqldefault}->{dbi}[$i]->{data_source} .= ';database=' . $options_result->{db_name}[$i]; $self->{sqldefault}->{psqlcmd}[$i]->{dbname} = $options_result->{db_name}[$i]; }