centreon::plugins::snmp - fix undefined value with discovery (#4493)

This commit is contained in:
qgarnier 2023-06-26 14:40:24 +02:00 committed by GitHub
parent 8c8f40632f
commit fecdbf1404
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -81,6 +81,8 @@ sub new {
$self->{output} = $options{output};
$self->{snmp_params} = {};
$self->{use_snmp_cache} = 0;
# Dont load MIB
$SNMP::auto_init_mib = 0;
$ENV{MIBS} = '';
@ -855,7 +857,6 @@ sub check_options {
$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 '') {
centreon::plugins::misc::mymodule_load(
output => $self->{output},