2 Replies Latest reply on Jun 3, 2019 11:14 AM by jjmerrill

    Looking for variable that returns the interface name from SNMP trap alerts

    jjmerrill

      I have the SNMP Trap Viewer configured to send an email alert when receiving trap OIDs "IF-MIB:linkDown" and "IF-MIB:linkUp" from certain community strings. This works well, but I'm looking for a variable that returns the actual name of the interface that the trap is reporting on. Here's an example of the trap output:

       

       

      IF-MIB:linkDown SNMP Trap

           Received Time:5/19/2019 10:30:00 AM

      Source:192.168.230.70(192.168.230.70)

      Community: CommunityString

           Variable Bindings

      sysUpTime:= 12 days 2 hours 44 minutes 39.81 seconds (104667981)

      snmpTrapOID:= IF-MIB:linkDown (1.3.6.1.6.3.1.1.5.3)

      ifIndex.54:= 54

      ifAdminStatus.54:= up(1) (1)

      ifOperStatus.54:= down(2) (2)

       

       

       

      On some devices, the trap returns a vbData variable that shows the name of the interface, but this isn't always present. I'm not sure I could this as a solution for all of my nodes given that the "ifName" isn't always returned.

       

       

       

      IF-MIB:linkDown SNMP Trap

           Received Time:5/23/2019 7:30:00 AM

      Source:192.168.230.80(192.168.230.80)

      Community: CommunityString

           Variable Bindings

      sysUpTime:= 50 days 14 hours 40 minutes 35.16 seconds (437283516)

      snmpTrapOID:= IF-MIB:linkDown (1.3.6.1.6.3.1.1.5.3)

      ifIndex.1542:= 1542

      ifAdminStatus.1542:= down(2) (2)

      ifOperStatus.1542:= down(2) (2)

      ifName.1542:= xe-1/2/4

       

       

       

       

      Here's how the interface in the first example looks in NPM. The Index value is shown, and matches what is given in the trap. If I could find a way to return the value in the name field, that would be ideal.

       

       

       

       

      So far, I've tried the following without any luck:

       

      ${Interface.Name}

      ${InterfaceName}

      ${Interface.Alias}

      ${InterfaceAlias}

      ${Interface.Description}

      ${InterfaceDescription}

      ${NetObjectName}

       

       

      I think I'm missing something simple. Is there a reference of variables that might help, or does anyone know of a variable that I could use? Thanks for the help.