12-04-2012 01:48 PM
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
Solved! Go to Solution.
12-04-2012 03:14 PM
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"
12-04-2012 03:27 PM
Now you have to switch get-type back to exact.
12-04-2012 03:46 PM
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"
12-04-2012 03:50 PM
When you do an SNMP Walk now, what is the object value? Does it actually move to down?
12-04-2012 03:53 PM
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
12-04-2012 04:05 PM
Ah, so this is a dynamic neighbor. In that case, you might be better matching on syslog messages versus polling.
12-04-2012 04:12 PM
Hi Joseph,
I was thinking that, simply because I was having a hard time with polling, but why do you say that?
12-04-2012 04:17 PM
Two reasons: one it will not require polling, so it will react more quickly. Two, it will work with dynamic neighbors.
12-04-2012 04:35 PM
Cool.
Thanks Joseph
Carlton
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide