![Cisco ASR 9000 Serie Скачать руководство пользователя страница 88](http://html.mh-extra.com/html/cisco/asr-9000-serie/asr-9000-serie_configuration-manuals_66679088.webp)
Purpose
Command or Action
•
event_register_process
•
event_register_syslog
•
event_register_timer
•
event_register_timer_subscriber
•
event_register_hardware
•
event_register_none
Policy developers can use the new namespace ::cisco in Tcl policies to group all
the extensions used by Cisco IOS XR EEM. There are two namespaces under
Add the appropriate namespace under
the ::cisco hierarchy.
Step 4
the ::cisco hierarchy. The following are the namespaces and the EEM Tcl
command extension categories that belongs under each namespace:
•
::cisco::eem
◦
EEM event registration
◦
EEM event information
◦
EEM event publish
◦
EEM action
◦
EEM utility
◦
EEM context library
◦
EEM system information
◦
CLI library
•
::cisco::lib
◦
SMTP library
Ensure that the appropriate namespaces are imported, or use the
qualified command names when using the preceding commands.
Note
This is an optional step. Must defines is a section of the policy that tests whether
any EEM environment variables that are required by the policy are defined before
Program the must defines section to
check for each environment variable
that is used in this policy.
Step 5
the recovery actions are taken. The must defines section is not required if the
policy does not use any EEM environment variables. EEM environment variables
for EEM scripts are Tcl global variables that are defined external to the policy
before the policy is run. To define an EEM environment variable, use the EEM
configuration command
event manager environment
. By convention, all Cisco
EEM environment variables begin with "_" (an underscore). To avoid future
conflict, customers are urged not to define new variables that start with "_".
You can display the Embedded Event Manager environment variables
set on your system by using the
show event manager environment
command in EXEC mode.
Note
Cisco ASR 9000 Series Aggregation Services Router System Monitoring Configuration Guide, Release 4.2.x
72
Configuring and Managing Embedded Event Manager Policies
How to Write Embedded Event Manager Policies Using Tcl