Closed K0nne closed 4 months ago
Same here when checking interface ERRORS on a Hyper-V host (running on a Fujitsu Server)
Interfaces checked are: Mellanox ConnectX-4 Lx Ethernet Adapter Mellanox ConnectX-4 Lx Ethernet Adapter #2 Intel(R) Ethernet Connection X722 for 10GBASE-T Intel(R) Ethernet Connection X722 for 10GBASE-T #2
Command line example:
'/usr/lib/nagios/plugins/check_nwc_health' '--community' 'mon_' '--hostname' '1.2.3.4' '--mode' 'interface-errors' '--name' 'Mellanox ConnectX-4 Lx Ethernet Adapter' '--statefilesdir' '/var/spool/icinga2/tmp'
Code at line 67893:
sub make_ifdescr_unique {
my ($self, $if) = @_;
$if->{ifDescr} = $if->{ifDescr}.' '.$if->{flat_indices} if $self->{duplicates}->{$if->{ifDescr}} > 1;
}
Assumption: Something to do with these very similar names, maybe? Apart from the message the check seems to work normally, though
Similar fault at line 68378 within sub make_ifdescr_unique.
$if->{ifDescr} = $if->{ifDescr}.' '.$if->{flat_indices} if defined $self->{duplicates}->{$if->{ifDescr}} && $self->{duplicates}->{$if->{ifDescr}} > 1;
This seems to fix the issue.
Hello lausser,
today I stumbled upon another 'uninitialized value' problem.
When I run the following command:
>> ./check_nwc_health --hostname XXX --community XXX --mode interface-status -vv
The following perl warning appears:
Use of uninitialized value in numeric gt (>) at ./check_nwc_health line 67893.
check_nwc_health version:
7.10.1.8
Here is the anonymized -vv output: