Just a simple Test Script
event manager applet TEST
event none
action 1.0 cli command "enable"
action 1.1 cli command "configure terminal"
action 1.2 cli command "hostname TEST"
!
and test the running the Sample and the Output:
evil-router#event manager run TEST
evil-router#
TEST#
TEST#
!
and if you enable debuging, you see, what is going on..
debug event manager action cli
Some other samples:
Syslog + SNMP Trap (syslog + snmp must be configured to be running)
event manager applet SYSLOG+TRAP
event none
action 1.0 snmp-trap strdata "TEST2-snmp-trap"
action 2.0 syslog msg "TEST2-syslog"
Interactive comands.
event manager applet test
event none
action 0.9 cli command "enable"
action 1.0 cli command "clear counter loopback 0" pattern "confirm"
action 1.1 cli command "y"
SNMP Trap after Syslog Event.
event manager applet FibDisableTrap
event syslog pattern ".*FIB-3-DISABLE.*"
action 1.0 snmp-trap strdata "EEM detected a FIB disable message on router1"