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

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


Community: CommunityString

     Variable Bindings

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

snmpTrapOID:= IF-MIB:linkDown (

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


Community: CommunityString

     Variable Bindings

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

snmpTrapOID:= IF-MIB:linkDown (

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:








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.

Parents Reply Children