Programming Eem Policies With Tcl; Tcl Policy Structure And Requirements - Cisco ASR 9000 Serie Configuration Manuals

Aggregation services router system
Table of Contents

Advertisement

How to Write Embedded Event Manager Policies Using Tcl
DETAILED STEPS
Command or Action
Step 1
show event manager policy available [system | user]
Example:
RP/0/RSP0/CPU0:router# show event manager policy
available
Step 2
configure
Step 3
event manager directory user {library path | policy path}
Example:
RP/0/RSP0/CPU0:router(config)# event manager directory
user library disk0:/user_library
Step 4
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 5
commit

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

Tcl Policy Structure and Requirements

All EEM policies share the same structure, shown in
page
Cisco ASR 9000 Series Aggregation Services Router System Monitoring Configuration Guide, Release 4.2.x
66
are optional.
67. There are two parts of an EEM policy that are required: the event_register Tcl command extension
Configuring and Managing Embedded Event Manager Policies
Purpose
Displays EEM policies that are available to be
registered.
Specifies a directory to use for storing user
library files or user-defined EEM policies.
Registers the EEM policy to be run when the
specified event defined within the policy occurs.
Figure 2: Tcl Policy Structure and Requirements , on
Tcl Policy Structure and

Advertisement

Table of Contents
loading

Table of Contents