[c-nsp] customizing snmp-traps (interface description as well as physical name)
Seth Mattinen
sethm at rollernet.us
Thu Jan 7 20:39:37 EST 2010
Walter Keen wrote:
> Is customizing snmp-traps possible through rmon or some other means so
> that the delivered message not only has the physical name (gi0/1, etc)
> but also the description of that port as named in the interface config?
> Dealing mostly with 2960's and 7600's, and trying to figure out if this
> is possible.
> Even if I have to specify an rmon entry per physical interface, I'm
> dealing with small enough numbers that would work.
> Something like '<int-name> <int-descr> is <down/up>' or similar would be
> ideal.
>
> Going to want to have this for link up/down initially, and then also
> setup some traps for taking on interface errors, etc.
>
Have your trap receiver do a query on the ifIndex that gets sent with
the trap. Example with snmpget where $1 is the ifIndex value:
snmpget -v1 -Oqv -c public host ifAlias.$1 ifName.$1
This will return the "description" of that interface and its name i.e.
Fa0/0.
~Seth
More information about the cisco-nsp
mailing list