mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 23:54:18 +02:00
centreon::plugins::snmp - fix undefined value with discovery (#4493)
This commit is contained in:
parent
8c8f40632f
commit
fecdbf1404
@ -81,6 +81,8 @@ sub new {
|
|||||||
$self->{output} = $options{output};
|
$self->{output} = $options{output};
|
||||||
$self->{snmp_params} = {};
|
$self->{snmp_params} = {};
|
||||||
|
|
||||||
|
$self->{use_snmp_cache} = 0;
|
||||||
|
|
||||||
# Dont load MIB
|
# Dont load MIB
|
||||||
$SNMP::auto_init_mib = 0;
|
$SNMP::auto_init_mib = 0;
|
||||||
$ENV{MIBS} = '';
|
$ENV{MIBS} = '';
|
||||||
@ -855,7 +857,6 @@ sub check_options {
|
|||||||
|
|
||||||
$self->{snmp_errors_exit} = $options{option_results}->{snmp_errors_exit};
|
$self->{snmp_errors_exit} = $options{option_results}->{snmp_errors_exit};
|
||||||
|
|
||||||
$self->{use_snmp_cache} = 0;
|
|
||||||
if (defined($options{option_results}->{snmp_cache_file}) && $options{option_results}->{snmp_cache_file} ne '') {
|
if (defined($options{option_results}->{snmp_cache_file}) && $options{option_results}->{snmp_cache_file} ne '') {
|
||||||
centreon::plugins::misc::mymodule_load(
|
centreon::plugins::misc::mymodule_load(
|
||||||
output => $self->{output},
|
output => $self->{output},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user