Configuration Examples for Writing Embedded Event Manager Policies Using Tcl
Table 179: Environment Variables Used in the tm_fsys_usage.tcl Policy
Environment Variable
_tm_fsys_usage_cron
_tm_fsys_usage_debug
_tm_fsys_usage_ freebytes
_tm_fsys_usage_percent
Registration of Some EEM Policies
Some EEM policies must be unregistered and then reregistered if an EEM environment variable is modified
after the policy is registered. The event_register_xxx statement that appears at the start of the policy contains
some of the EEM environment variables, and this statement is used to establish the conditions under which
the policy is run. If the environment variables are modified after the policy has been registered, the conditions
may become invalid. To avoid any errors, the policy must be unregistered and then reregistered. The following
variables are affected:
• _cron_entry in the tm_cli_cmd.tcl policy
• _syslog_pattern in the sl_intf_down.tcl policy
Basic Configuration Details for All Sample Policies
To allow e-mail to be sent from the Embedded Event Manager, the hostname and ip domain-name commands
must be configured. The EEM environment variables must also be set. After a Cisco IOS image has been
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1806
Description
A CRON specification that is used
in the event_register Tcl command
extension. If unspecified, the
tm_fsys_usage.tcl policy is
triggered once per minute. This
variable is optional and need not
be specified.
When this variable is set to a value
of 1, disk usage information is
displayed for all entries in the
system. This variable is optional
and need not be specified.
Free byte threshold for systems or
specific prefixes. If free space falls
below a given value, a warning is
displayed. This variable is optional
and need not be specified.
Disk usage percentage thresholds
for systems or specific prefixes. If
the disk usage percentage exceeds
a given percentage, a warning is
displayed. If unspecified, the
default disk usage percentage is 80
percent for all systems. This
variable is optional and need not
be specified.
Example
0-59/1 0-23/1 * * 0-7
1
disk2:98000000
nvram:25 disk2:5