08-20-2012 11:25 PM
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.
08-21-2012 07:50 AM
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.
08-21-2012 08:57 PM
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.
08-22-2012 07:48 AM
I don't quite follow. Can you provide some more context?
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