![Cisco ASR 9000 Serie Configuration Manuals Download Page 82](http://html.mh-extra.com/html/cisco/asr-9000-serie/asr-9000-serie_configuration-manuals_66679082.webp)
DETAILED STEPS
Purpose
Command or Action
Displays EEM policies that are available to be
registered.
show event manager policy available
[
system
|
user
]
Example:
RP/0/RSP0/CPU0:router# show event manager policy
available
Step 1
configure
Step 2
Specifies a directory to use for storing user
library files or user-defined EEM policies.
event manager directory user
{
library path
|
policy path
}
Example:
RP/0/RSP0/CPU0:router(config)# event manager directory
user library disk0:/user_library
Step 3
Registers the EEM policy to be run when the
specified event defined within the policy occurs.
event manager policy policy-name username username
[
persist-time
[
seconds
|
infinite
] |
type
[
system
|
user
]]
Example:
RP/0/RSP0/CPU0:router(config)# event manager policy
test.tcl username user_a type user
Step 4
commit
Step 5
Programming EEM Policies with Tcl
Perform this task to help you program a policy using Tcl command extensions. We recommend that you copy
an existing policy and modify it. There are two required parts that must exist in an EEM Tcl policy: the
event_register Tcl command extension and the body. All other sections shown in the
Requirements, on page 66
are optional.
Tcl Policy Structure and Requirements
All EEM policies share the same structure, shown in
Figure 2: Tcl Policy Structure and Requirements , on
page 67
. There are two parts of an EEM policy that are required: the event_register Tcl command extension
Cisco ASR 9000 Series Aggregation Services Router System Monitoring Configuration Guide, Release 4.2.x
66
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl