Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

Same EEM Script on multiple devices

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.

Everyone's tags (6)
3 REPLIES
Cisco Employee

Same EEM Script on multiple devices

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.

New Member

Same EEM Script on multiple devices

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.

Cisco Employee

Same EEM Script on multiple devices

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

1166
Views
0
Helpful
3
Replies
CreatePlease to create content