diff --git a/centreon/plugins/wsman.pm b/centreon/plugins/wsman.pm index a04d60aa0..6a1ee12a7 100644 --- a/centreon/plugins/wsman.pm +++ b/centreon/plugins/wsman.pm @@ -110,6 +110,11 @@ sub connect { $self->{output}->option_exit(exit_litteral => $self->{wsman_errors_exit}); } + if ($self->{wsman_params}->{wsman_scheme} eq 'https') { + # Dont verify + $client->transport()->set_verify_peer(0); + } + $self->{client}->transport()->set_auth_method($auth_method_map{$self->{wsman_params}->{wsman_auth_method}}); $self->{client}->transport()->set_timeout($self->{wsman_params}->{wsman_timeout}); if (defined($self->{wsman_params}->{wsman_proxy_url})) { diff --git a/snmp_standard/mode/memory.pm b/snmp_standard/mode/memory.pm index a8466ff27..89117d02e 100644 --- a/snmp_standard/mode/memory.pm +++ b/snmp_standard/mode/memory.pm @@ -84,7 +84,7 @@ sub run { $oid_memShared, $oid_memBuffer, $oid_memCached], nothing_quit => 1); - my $shared_used = $result->{$oid_memShared} * 1024; + my $shared_used = defined($result->{$oid_memShared}) ? $result->{$oid_memShared} * 1024 : 0; my $cached_used = $result->{$oid_memCached} * 1024; my $buffer_used = $result->{$oid_memBuffer} * 1024; my $physical_used = ($result->{$oid_memTotalReal} * 1024) - ($result->{$oid_memAvailReal} * 1024); diff --git a/snmp_standard/mode/numericvalue.pm b/snmp_standard/mode/numericvalue.pm index 335bd182f..e7186b73b 100644 --- a/snmp_standard/mode/numericvalue.pm +++ b/snmp_standard/mode/numericvalue.pm @@ -75,6 +75,8 @@ sub check_options { $self->{output}->add_option_msg(short_msg => "Need to specify an OID."); $self->{output}->option_exit(); } + $self->{option_results}->{oid} .= '.' if ($self->{option_results}->{oid} !~ /^\./); + if ($self->{option_results}->{oid_type} !~ /^gauge|counter$/i) { $self->{output}->add_option_msg(short_msg => "Wrong --oid-type argument '" . $self->{option_results}->{oid_type} . "' ('gauge' or 'counter')."); $self->{output}->option_exit();