cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2187
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

1 ACCEPTED SOLUTION

Accepted Solutions
Joe Clarke
Hall of Fame Cisco Employee

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

View solution in original post

23 REPLIES 23

I think the problem is the actual OID for ospfNbrState for the router.... but I'm not sure

Joe Clarke
Hall of Fame Cisco Employee

I answered this for you on a previous thread:

https://supportforums.cisco.com/thread/2185121?tstart=0

You're still trying to use an OID without an instance and a get-type of exact.  That will not work.  Either switch to a get-type of next or add the specific instance of this OID.

Hi Joseph,

Going to read the previous answer in more detail and try it again now. Thanks for responding.

Joseph,

Can you explain what you mean when you say..

For one, you cannot use a leading '.'. Two, you have not put an instance here


And can you give me an example of an instance?

Cheers

Joe Clarke
Hall of Fame Cisco Employee

Do an SNMP Walk of the ospfNbrTable (1.3.6.1.2.1.14.10) and you will see the OIDs with the instances.  You must use one of those instances to use a get-type of exact.

Joseph,

I changed the even applet as follows:

event manager applet test1 trap

event snmp oid 1.3.6.1.2.1.14.10.1.6 get-type next entry-op eq entry-val 1 poll-interval 2

action 1.0 syslog msg "ospf stat message"

I then shut down an interface to test the eem but it didn't work.

Joe Clarke
Hall of Fame Cisco Employee

Then you have more than one peer/network and the one that went down was not the first instance.  You will then need to find the exact instance you want.

Joseph,

Thanks again for responding. You're correct, I have one other ospf neighbor. However, can you tell me how to establish the instances that current?

Cheers

Joe Clarke
Hall of Fame Cisco Employee

You need to do that SNMP Walk to see what instances you have.  The instances should correspond to the IP address of the peer.

Joesph,

Thanks again. Can you please take a look at the snmp walk in the attachment. Can you please identify the instance?

Joe Clarke
Hall of Fame Cisco Employee

That's up to you.  You see your two peers.  Which one do you want to trigger on?  Use that instance in your applet.

If I wanted to trigger on the first peer 10.0.0.13, then would my oid be 1.3.6.1.2.1.14.10.1.6.10.0.0.13.0 ?

Cheers

Joe Clarke
Hall of Fame Cisco Employee

Yes.

OK, going to try that now....

Cheers

Carlton