Running The Tm_Fsys_Usage.tcl Sample Policy; Programming Policies With Tcl: Sample Scripts Example; Tm_Cli_Cmd.tcl Sample Policy - Cisco ASR 9000 Serie Configuration Manuals

Aggregation services router system
Table of Contents

Advertisement

Configuring and Managing Embedded Event Manager Policies
interface_tm.cgi script. The crash_report_display.cgi script should be placed on the same machine that contains
interface_tm.cgi. The machine should be running a web browser such as Internet Explorer or Netscape. When
the crash_report_display.cgi script is run, it displays the crash information in a readable format.
The following sample configuration demonstrates how to use this policy. Starting in EXEC mode, enter the
show event manager policy registered command to verify that no policies are currently registered. Next,
enter the show event manager policy available command to display which policies are available to be
installed. After you enter the configure command to reach global configuration mode, you can register the
tm_crash_reporter.tcl policy with EEM using the event manager policy command. Exit from global
configuration mode and enter the show event manager policy registered command to verify that the policy
has been registered.
enable
show event manager policy registered
show event manager policy available
configure terminal
event manager policy tm_crash_reporter.tcl
end
show event manager policy registered

Running the tm_fsys_usage.tcl Sample Policy

This sample policy demonstrates the ability to periodically monitor disk space usage and report through syslog
when configurable thresholds have been crossed.
The following sample configuration demonstrates how to use this policy. Starting in user EXEC mode, enter
the show event manager policy registered command to verify that no policies are currently registered. Next,
enter the show event manager policy available command to display which policies are available to be
installed. After you enter the configure command to reach global configuration mode, you can register the
tm_fsys_usage.tcl policy with EEM using the event manager policy command. Exit from global configuration
mode and enter the show event manager policy registered command again to verify that the policy has been
registered. If you had configured any of the optional environment variables that are used in the tm_fsys_usage.tcl
policy, the show event manager environment command displays the configured variables.
enable
show event manager policy registered
show event manager policy available
configure terminal
event manager policy tm_fsys_usage.tcl
end
show event manager policy registered
show event manager environment

Programming Policies with Tcl: Sample Scripts Example

This section contains two of the sample policies that are included as EEM system policies. For more details
about these policies, see the

tm_cli_cmd.tcl Sample Policy

The following sample policy runs a configurable CRON entry. The policy executes a configurable Cisco IOS XR
SoftwareCLI command and e-mails the results. An optional log file can be defined to which the output is
appended with a time stamp.
::cisco::eem::event_register_timer cron name crontimer2 cron_entry $_cron_entry maxrun 240
EEM Event Detector Demo: Example , on page
Cisco ASR 9000 Series Aggregation Services Router System Monitoring Configuration Guide, Release 4.2.x
Programming Policies with Tcl: Sample Scripts Example
82.
87

Advertisement

Table of Contents
loading

Table of Contents