(plugin) network::cisco::standard::snmp - mode environment undefined module name (#4441)

This commit is contained in:
qgarnier 2023-06-02 19:51:49 +02:00 committed by GitHub
parent fb87a462a2
commit b659c46e05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -76,7 +76,8 @@ sub check {
$oid =~ /\.([0-9]+)$/;
my $instance = $1;
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_cefcModuleOperStatus}, instance => $instance);
my $module_descr = $self->{results}->{$self->{physical_name} }->{ $self->{physical_name} . '.' . $instance };
my $module_descr = defined($self->{results}->{ $self->{physical_name} }->{ $self->{physical_name} . '.' . $instance }) ?
$self->{results}->{ $self->{physical_name} }->{ $self->{physical_name} . '.' . $instance } : 'n/a';
next if ($self->check_filter(section => 'module', instance => $instance, name => $module_descr));