Ad Widget

Collapse

SNMP LLD Discovery MAC in OID

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • m.flier
    Junior Member
    • Nov 2016
    • 2

    #1

    SNMP LLD Discovery MAC in OID

    Hello,

    I've recently started using Zabbix, primarily for Network Device SNMP.
    All is ok, but now I've run across a Mikrotik Bridge connection which I try to monitor.

    Mikrotik adds the MAC address (in decimal) in the OID for each connected client. Since i'm creating bridges, I only have one MAC present in the table.

    So when I Walk the table "mtxrWlRtabTable" (.1.3.6.1.4.1.14988.1.1.1.2) I get results such as:

    Name/OID: .1.3.6.1.4.1.14988.1.1.1.2.1.1.108.59.107.71.216.1 26.2
    mtxrWlRtabAddr.108.59.107.71.216.126.2;
    Value (OctetString): 6C-3B-6B-47-D8-7E

    Name/OID: .1.3.6.1.4.1.14988.1.1.1.2.1.11.108.59.107.71.216. 126.2
    mtxrWlRtabUptime.108.59.107.71.216.126.2;
    Value (TimeTicks): 17 hours 16 minutes 23 seconds (6218300)

    This part -> 108.59.107.71.216.126 - in the OID translates to the mac address decimal to hex.
    Now if I create a template with predetermined OID, and include a Macro to adjust for MAC with each of my hosts this works.
    Example:
    OID: MIKROTIK-MIB::mtxrWlRtabAddr.{$WLCLIENT}.2 where {$WLCLIENT} is defined for this specific host as: 108.59.107.71.216.126

    But what I would like to accomplish is a discovery rule to achieve this. i've tried to do this without macro, but this does not work. It seems like #SNMPINDEX does not support a value longer than one number. This is my preferred solution.
    Example:
    Discovery: discovery[{#WLConnClient},MIKROTIK-MIB::mtxrWlRtabAddr]
    Item Prototype: MIKROTIK-MIB::mtxrWlRtabAddr.{#SNMPINDEX} does not work
    Item Prototype: MIKROTIK-MIB::mtxrWlRtabAddr.{#WLConnClient} also does not work

    With Macro it also does not work:
    Discovery: discovery[{#WLConnClient},MIKROTIK-MIB::mtxrWlRtabAddr.{$WLCLIENT}]
    Item Prototype: MIKROTIK-MIB::mtxrWlRtabAddr.{$WLCLIENT}.{#SNMPINDEX} does not work

    please note, the macro does work for the template item without discovery:
    Item: MIKROTIK-MIB::mtxrWlRtabAddr.{$WLCLIENT}.2

    Am I doing something wrong, or is it impossible to do a SNMP discovery with a mac in the OID, or generally more numbers beyong the name of the oid, ie IF-MIB::ifDescr.1.1

    The question might be a bit fuzzy, so I would love to elaborate if you need more details.

    Cheers.
  • snicolas
    Junior Member
    • Nov 2014
    • 4

    #2
    Pardon if this is breaking any thread reanimation rules but I am having this very same problem and cannot wrap my mind around what external script/method to use here.


    I have RUCKUS products and they use the MAC address as a suffix.


    ie:
    .1.3.6.1.4.1.25053.1.2.2.1.1.3.1.1.1.6.0.31.226.140.14.235 gives the mac address which in this case is : 0:1f:e2:8c:e:eb

    and

    .1.3.6.1.4.1.25053.1.2.2.1.1.3.1.1.4.6.0.31.226.140.14.235 would access another value from that 'record' . How to do LLD of these without manually making templates for each MAC address.


    EDIT: Turns out I misunderstood SNMP LLD discovery with Zabbix 3.0+ . I did not need any external scripts...just do discovery on the first part of the OID without the mac address encoding ie: .1.3.6.1.4.1.25053.1.2.2.1.1.3.1.1.1 and SNMPINDEX will be automatically filled with the rest of the OID, SNMPVALUE will receive the text value of the MAC address, or whatever other OID info you are pointing to. That simple! What threw me off is the weird 'textual'representation you can sometimes see for this OID. For example, when translated I get: RUCKUS-ZD-WLAN-MIB::ruckusZDWLANAPMacAddr[STRING: 6:d4:68:4d:1f:58].0 = STRING: d4:68:4d:1f:58:0 For some reason the trailing .0 is not included in the string so that really threw me off in understanding the indexes...my advice if you are working on RUCKUS devices: just use numeric OIDs to do your LLD and don't struggle too much with textual representations of the indexes.
    Last edited by snicolas; 01-12-2017, 19:34. Reason: found my solution

    Comment

    • Starko
      Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Aug 2012
      • 93

      #3
      Thanks snicolas your reply helped me a lot!

      Comment

      Working...