+ Small fix on snmp snmp_standard
This commit is contained in:
parent
3cd433a4e9
commit
b0044f59ef
|
@ -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})) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue