Workflow to Run EEM Scripts
Complete the following tasks to provision EEM scripts:
Download the script—Store the EEM script on an HTTP server or copy to the hard disk of the router. Add the EEM script from the HTTP server or hard disk to the script management repository on the router using the
script add eem
command.Define events—Configure the events with the trigger conditions using the
event manager event-trigger
command.Define actions to the events—Setup the actions that must be performed in response to an event using
event manager action
command.Create policy map—Put together the events and the actions in a policy map using
event manager policy-map
command.Note: An EEM script is invoked automatically when the event occurs. With the event, the event-trigger invokes the corresponding policy-map to implement the actions in response to the event.
View operational status of the event—Retrieve the operational data using the
show event-manager action | event-trigger | policy-map
command.
The following image shows a workflow diagram representing the steps involved in using an event script:
For more information about performing the workflow, managing EEM scripts, and viewing examples, see the Automation Scripts chapter based on the platform:
- Programmability Configuration Guide for Cisco 8000 Series Routers, IOS XR Release 7.3.x and later versions
- Programmability Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.3.x and later versions
- Programmability Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.3.x and later versions
- Programmability Configuration Guide for Cisco NCS 5000 Series Routers, IOS XR Release 7.3.x and later versions