cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2530
Views
0
Helpful
3
Replies

Same EEM Script on multiple devices

bhatnagarankit
Level 1
Level 1

Hi,

I would like to know if we can use a single EEM script on one device and trigger some configuration changes on other devices.

3 Replies 3

Joe Clarke
Cisco Employee
Cisco Employee

Sure.  There are a few ways to do this.  Probably the easiest is to use SNMP traps.  One device sends an SNMP trap to another device that EEM intercepts and performs some action.  For example, on one device that will detect an event configure:

event manager applet ospf-change

event syslog pattern "OSPF-5-ADJCHG"

action 1.0 cli command "enable"

action 2.0 cli command "debug ip ospf packet"

action 3.0 snmp-trap intdata1 424242

!

snmp-server enable traps event-manager

snmp-server host 10.1.1.1 traps public event-manager

On the second device that will receive the trap (10.1.1.1), configure:

event manager applet ospf-change

event snmp-notification oid 1.3.6.1.4.1.9.10.91.1.2.3.1.9. oid-val "424242" op eq src-ip-address 10.1.1.2

action 1.0 cli command "enable"

action 2.0 cli command "debug ip ospf packet"

!

snmp-server manager

This example passes a number (424242) in the trap, and the receiving device then enables the proper debugging.  This could be a config change as well.  You could also pass string data using the strdata varbind in the trap.

Thanks jospeh.

I would also like to know that in this case i would have to define the actions that need to be taken on the device individually and they can not be defined on a single device.

I don't quite follow.  Can you provide some more context?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: