Embedded Event Manager
Embedded Event Manager
What is EEM ?:
EEM (Embedded Event manager is a software component of cisco IOS, XR, and NX-
OS
EEM gives you high abilities to admin your cisco device by tracking and monitoring
events that take place on your Cisco device and then apply action you already decided
early , EEM by giving you this ability , it allow you to automate many tasks .
EEM Types:
There are two EEM independent pieces (types): Applets and Scripting
I will give 11 examples for applets and lets put in our minds that we can have Only one
event per applet with single or Multiple actions run in sequence.
EEM use Event detectors to understand that event occured, some of these dectectors
are :
Counter: Monitoring and responding to interface counter when cross threshold settings.
None: This event detector is use to test EEM script/applet using "event manager run"
command.
EEM can take many actions once event happens , actions could be :
during creating your EEM Applet you can use some regular expressions , the
following are common used ones :
^ = Start of string
$ = End of string
first you will give (Applet Name) then you will decide what (Event Detector) will
be used to detect specific event then finally what (Actions) you would like to
automatically run once this event occur
example one :
Lets create manually triggerd applet , once we run it will trun router interface up
and give it ip address .
sync yes mean run the commands synchronously which mean run each command and
wait tell it execute then run the nest one.)
1.0 is just number of actions and better to use gaps between numbers so maybe you
return back to add another missing action
cli mean we will use cli to type a command , this command will be typed on your behalf .
finally once you want to run this EEM Applet , just type the following command :
you can run R1#show event manager policy available , to see the eems in your router.
example two:
lets create manually triggerd EEM applet which show a syslog message once we
run it
R1(config-applet)#event none
R1(config-applet)#end
R1#
R1#
example three:
this eem will save configurtaion , show console message about going to reload
the router and then reload the router
R1(config-applet)#action 4.0 reload (note no "" since its avilable as command if you type
action 4.0 ?)
R1(config-applet)#exit
example four:
lets create automatically running EEM applet which once fas0/0 goes down will
make router return it back and then send email to admin
R1(config-applet)#exit
including how disable some routers commands , use EEM for backup links , creating
event manager environment for emails and more .
Yasser Auda