I am trying to use check_snmp_int.pl to check windows interfaces.
The interfaces are named as:
I think the script is comparing internally the description like this:................. interface omitted for brevity .................
OID : 1.3.6.1.2.1.2.2.1.2.8, Desc : WAN Miniport (IP)
OID : 1.3.6.1.2.1.2.2.1.2.12, Desc : Microsoft Hyper-V Network Adapter #2
OID : 1.3.6.1.2.1.2.2.1.2.17, Desc : Microsoft Hyper-V Network Adapter-QoS Packet Scheduler-0000
OID : 1.3.6.1.2.1.2.2.1.2.18, Desc : Microsoft Hyper-V Network Adapter-WFP LightWeight Filter-0000
OID : 1.3.6.1.2.1.2.2.1.2.20, Desc : WAN Miniport (IP)-QoS Packet Scheduler-0000
OID : 1.3.6.1.2.1.2.2.1.2.13, Desc : Microsoft Hyper-V Network Adapter
OID : 1.3.6.1.2.1.2.2.1.2.11, Desc : Microsoft Hyper-V Network Adapter
Code: Select all
verb("Filter : $o_descr");
foreach my $key ( keys %$resultat) {
verb("OID : $key, Desc : $$resultat{$key}");
# test by regexp or exact match
my $test = defined($o_noreg)
? $$resultat{$key} eq $o_descr
: $$resultat{$key} =~ /$o_descr/
Ι get more interfaces that I should:
./check_snmp_int.pl -H x.x.x.x -C SNMP_COMMUNITY -n "Microsoft Hyper-V Network Adapter #2"
Microsoft Hyper-V Network Adapter #2-WFP LightWeight Filter-0000:UP, Microsoft Hyper-V Network Adapter #2:NotPresent, Microsoft Hyper-V Network Adapter #2:UP, Microsoft Hyper-V Network Adapter #2-QoS Packet Scheduler-0000:UP: 1 int NOK : CRITICAL
Disabling the regex, the plugin fails:
./check_snmp_int.pl -H x.x.x.x -C SNMP_COMMUNITY -r -n "Microsoft Hyper-V Network Adapter #2"
ERROR : Unknown interface Microsoft Hyper-V Network Adapter #2