cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2570
Views
0
Helpful
23
Replies

SNMP EEM Creation Help

Hello Cisco Community

Can someone please provide some guidance on how to create an EEM Applet to monitor an SNMP OID? In particular I would like to know how to monitor ospf neighbor state.

The top level mib of ospfNbrState is .1.3.6.1.2.1.14.10.1.6. However, the OID isn't enough.

For example

event manager applet snmptest

event snmp oid 1.3.6.1.2.1.14.10.1.6 poll_interval 2 get_type exact entry_type value entry_op ge entry_val 1  exit_comb or exit_time 300 maxrun 20

action syslog msg "snmp test"

The above action won't be generated when there is an ospf state change.

Can someone please provide some guidance?

Cheers

Carlton

23 Replies 23

HI Joseph,

I tried the following without any luck:

event manager applet test1 trap
event snmp oid 1.3.6.1.2.1.14.10.1.6.10.0.0.13.0 get-type next entry-op eq entry-val 1 poll-interval 2
action 1.0 syslog msg "ospf stat message"

Now you have to switch get-type back to exact.

Joseph,

Thanks for sticking with me on this question.

I now have the following config in the router, however when I shut down the interface to neighbor 10.0.0.13 no syslog messaga appears:

event manager applet test1 trap

event snmp oid 1.3.6.1.2.1.14.10.1.6.10.0.0.13.0 get-type exact entry-op eq entry-val 1 poll-interval 2

action 1.0 syslog msg "ospf stat message"

When you do an SNMP Walk now, what is the object value?  Does it actually move to down?

Its always 10.0.0.13.0 when the interface is up. When I shut down the interface there isn't a value when I do a walk

Ah, so this is a dynamic neighbor.  In that case, you might be better matching on syslog messages versus polling.

Hi Joseph,

I was thinking that, simply because I was having a hard time with polling, but why do you say that?

Two reasons: one it will not require polling, so it will react more quickly.  Two, it will work with dynamic neighbors.

Cool.

Thanks Joseph

Carlton