SNMP Check Switch Interface Alias

Hello,

we are using a few different Moxa industrial switches (EDS-408A, EDS-G509).
CheckMK perfectly discovers the interfaces of the switch, speed, type and so on.
Only the Interface Alias is not discovered.

It seems the vendor is not using the default? Alias OID 1.3.6.1.2.1.31.1.1.1.18
Instead the vendor published its own MIB and uses the OID 1.3.6.1.4.1.8691.7.18.1.9.1.1.7 for the interface Alias.

Is it possible to tell CheckMK to use this OID for the interface Alias?
The Check used is check_mk-if64

Or what would be the simplest way to use the standard check if64 just with a different OID for ifAlias?

Thanks!

Hello DiDo,

could you tell us the Check_MK edition and version you’re running?

Kruzgoth

The only way would be to create an Moxa specific interface check and then disable the default if64 check for your Moxa devices.
To modification of the if64 to get a own Moxa check is not so trivial as it consists of more than one file.

Hi,
I am using CheckMK Enterprise Edition and recently upgraded to 1.6.0 p19, the switches are upgraded to the last existing firmware from Moxa, v3.10 and v3.8
https://www.moxa.com/en/products/industrial-network-infrastructure/ethernet-switches/layer-2-managed-switches/eds-408a-series#resources

Complain at the vendor why they do not conform to the SNMP interfaces MIB.

Okay thanks, I hoped there would be a rule or some simple way to configure this as a parameter for the check if64.

I saw that in the checkmk checks folder there is a check if64_tplink which seems to do something similar, fetch ifalias for tplink from a custom OID.

I will try if I can copy and rewrite the check to use the moxa OID…

Yes you are right they should be using the default OID, maybe I can contact them.
This would be best for a long-term solution…

Yes this would be a good start and also a quick solution :slight_smile:

I was able to create a new check for the moxa switch. It is basically a copy and paste from the already existing checks if64 and if64_tplink

It is working, but not usable for all moxa switches because the vendor ifAlias ID is different for every switch series (.1.3.6.1.4.1.8691.7.18.1.9.1.1.7 EDS-G509) (.1.3.6.1.4.1.8691.7.7.1.9.1.1.7 EDS-408A)

So for a check to work for all moxa switches it would be necessary to determine the correct OID for the switch inside the check.
Because we only use this two types I just created two checks one for each switch series.

Here is the code, maybe it helps someone else…

#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-

@network_interface_scan_registry.register
def snmp_scan_function_if64_moxa(oid):
return oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.8691.7.18")

def inventory_if64_moxa(info):
return inventory_if_common(info, has_nodeinfo=True)

def check_if64_moxa(item, params, info):
return check_if_common(item, params, info, has_nodeinfo=True)

check_info["if64_moxa_EDS-G509"] = {
'parse_function': parse_if64,
'check_function': check_if64_moxa,
'inventory_function': inventory_if64_moxa,
'service_description': 'Interface %s',
'has_perfdata': True,
'includes': ['if.include'],
'snmp_info': (
    ".1.3.6.1",
    [
        "2.1.2.2.1.1",  # ifIndex                    0
        "2.1.2.2.1.2",  # ifDescr                    1
        "2.1.2.2.1.3",  # ifType                     2
        "2.1.2.2.1.5",  # ifSpeed                    3
        "2.1.2.2.1.8",  # ifOperStatus               4
        "2.1.31.1.1.1.6",  # ifHCInOctets            5
        "2.1.31.1.1.1.7",  # ifHCInUcastPkts         6
        "2.1.31.1.1.1.8",  # ifHCInMulticastPkts     7
        "2.1.31.1.1.1.9",  # ifHCInBroadcastPkts     8
        "2.1.2.2.1.13",  # ifInDiscards              9
        "2.1.2.2.1.14",  # ifInErrors               10
        "2.1.31.1.1.1.10",  # ifHCOutOctets         11
        "2.1.31.1.1.1.11",  # ifHCOutUcastPkts      12
        "2.1.31.1.1.1.12",  # ifHCOutMulticastPkts  13
        "2.1.31.1.1.1.13",  # ifHCOutBroadcastPkts  14
        "2.1.2.2.1.19",  # ifOutDiscards            15
        "2.1.2.2.1.20",  # ifOutErrors              16
        "2.1.2.2.1.21",  # ifOutQLen                17
        "4.1.8691.7.18.1.9.1.1.7",  # ifAlias special for Moxa Switch EDS G509
        BINARY("2.1.2.2.1.6"),  # ifPhysAddress            19
        "2.1.31.1.1.1.15",  # ifHighSpeed              -1  (parse_if64 assumes this is the last element)
    ]),
'snmp_scan_function': snmp_scan_function_if64_moxa,
'group': 'if',
'node_info': True,
'default_levels_variable': 'if_default_levels',
}

Thanks for the quick responses, this solves the problem for my environment :slight_smile:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact @fayepal if you think this should be re-opened.