![Cisco ASR 9000 Serie Configuration Manuals Download Page 73](http://html.mh-extra.com/html/cisco/asr-9000-serie/asr-9000-serie_configuration-manuals_66679073.webp)
Username
To register an EEM policy, you must specify the username that is used to run the script. This name can be
different from the user who is currently logged in, but the registering user must have permissions that are a
superset of the username that will run the script. Otherwise, the script is not registered and the command is
rejected. In addition, the username that will run the script must have access privileges to the commands run
by the EEM policy being registered.
AAA authorization (such as the
aaa authorization eventmanager
command) must be configured before
EEM policies can be registered. See the
Configuring AAA Services
module of
Configuring AAA Services
on Cisco IOS XR Software
for more information about AAA authorization configuration.
Note
Persist-time
An optional
persist-time
keyword for the username can also be defined. The
persist-time
keyword defines
the number of seconds the username authentication is valid. When a script is first registered, the configured
username for the script is authenticated. After the script is registered, the username is authenticated again each
time a script is run. If the AAA server is down, the username authentication can be read from memory. The
persist-time
keyword determines the number of seconds this username authentication is held in memory.
•
If the AAA server is down and the
persist-time
keyword has not expired, then the username is
authenticated from memory and the script runs.
•
If the AAA server is down, and the
persist-time
keyword has expired, then user authentication will fail
and the script will not run.
The following values can be used for the
persist-time
keyword.
•
The default
persist-time
is 3600 seconds (1 hour). Enter the
event manager policy
command without
the
persist-time
keyword to set the
persist-time
to 1 hour.
•
Enter 0 to stop the username authentication from being cached. If the AAA server is down, the username
will not authenticate and the script will not run.
•
Enter
infinite
to stop the username from being marked as invalid. The username authentication held in
the cache will not expire. If the AAA server is down, the username will be authenticated from the cache.
System or user keywords
If you enter the
event manager policy
command without specifying either the
system
or
user
keyword, the
EEM first tries to locate the specified policy file in the system policy directory. If the EEM finds the file in
the system policy directory, it registers the policy as a system policy. If the EEM does not find the specified
policy file in the system policy directory, it looks in the user policy directory. If the EEM locates the specified
file in the user policy directory, it registers the policy file as a user policy. If the EEM finds policy files with
the same name in both the system policy directory and the user policy directory, the policy file in the system
policy directory takes precedence and is registered as a system policy.
Once policies have been registered, their registration can be verified through the
show event manager policy
registered
command. The output displays registered policy information in two parts. The first line in each
policy description lists the index number assigned to the policy, the policy type (system or user), the type of
event registered, the time when the policy was registered, and the name of the policy file. The remaining lines
of each policy description display information about the registered event and how the event is to be handled,
and come directly from the Tcl command arguments that make up the policy file.
Cisco ASR 9000 Series Aggregation Services Router System Monitoring Configuration Guide, Release 4.2.x
57
Configuring and Managing Embedded Event Manager Policies
Registering Embedded Event Manager Policies