•
If the
action snmp-trap
command is used, the
snmp-server enable traps event-manager
command
must be enabled to permit SNMP traps to be sent from the Cisco IOS device to the SNMP server. Other
relevant
snmp-server
commands must also be configured; for details see the
action snmp-trap
command
page.
Information About Writing EEM Policies Using the Cisco IOS CLI
Embedded Event Manager Policies
EEM offers the ability to monitor events and take informational or corrective action when the monitored
events occur or a threshold is reached. An EEM policy is an entity that defines an event and the actions to be
taken when that event occurs. There are two types of EEM policies: an applet or a script. An applet is a simple
form of policy that is defined within the CLI configuration. A script is a form of policy that is written in Tool
Command Language (Tcl).
EEM Applet
An EEM applet is a concise method for defining event screening criteria and the actions to be taken when
that event occurs. In applet configuration mode, three types of configuration statements are supported. The
event
commands are used to specify the event criteria to trigger the applet to run, the
action
commands are
used to specify an action to perform when the EEM applet is triggered, and the
set
command is used to set
the value of an EEM applet variable. Currently only the _exit_status variable is supported for the
set
command.
Only one
event
configuration command is allowed within an applet configuration. When applet configuration
mode is exited and no
event
command is present, a warning is displayed stating that no event is associated
with this applet. If no event is specified, this applet is not considered registered. When no action is associated
with this applet, events are still triggered but no actions are performed. Multiple
action
configuration commands
are allowed within an applet configuration. Use the
show event manager policy registered
command to
display a list of registered applets.
Before modifying an EEM applet, be aware that the existing applet is not replaced until you exit applet
configuration mode. While you are in applet configuration mode modifying the applet, the existing applet
may be executing. It is safe to modify the applet without unregistering it. When you exit applet configuration
mode, the old applet is unregistered and the new version is registered.
The action configuration commands are uniquely identified using the
label
argument, which can be any string
value. Actions are sorted in ascending alphanumeric key sequence using the
label
argument as the sort key,
and they are run using this sequence.
The Embedded Event Manager schedules and runs policies on the basis of an event specification that is
contained within the policy itself. When applet configuration mode is exited, EEM examines the
event
and
action
commands that are entered and registers the applet to be run when a specified event occurs.
EEM Script
Scripts are defined off the networking device using an ASCII editor. The script is then copied to the networking
device and registered with EEM. Tcl scripts are supported by EEM.
EEM allows you to write and implement your own policies using Tcl. Writing an EEM policy involves:
•
Selecting the event for which the policy is run.
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1684
Information About Writing EEM Policies Using the Cisco IOS CLI
Содержание Catalyst 2960 Series
Страница 78: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches lxxviii Contents ...
Страница 96: ......
Страница 184: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 102 Additional References ...
Страница 195: ...P A R T II IP Multicast Routing Configuring IGMP Snooping and Multicast VLAN Registration page 115 ...
Страница 196: ......
Страница 250: ......
Страница 292: ......
Страница 488: ......
Страница 589: ...P A R T VI Cisco Flexible NetFlow Configuring NetFlow Lite page 509 ...
Страница 590: ......
Страница 619: ...P A R T VII QoS Configuring QoS page 539 Configuring Auto QoS page 645 ...
Страница 620: ......
Страница 749: ...P A R T VIII Routing Configuring IP Unicast Routing page 669 Configuring IPv6 First Hop Security page 677 ...
Страница 750: ......
Страница 796: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 714 Additional References ...
Страница 856: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 774 Additional References ...
Страница 1400: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 1318 Additional References ...
Страница 1546: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 1464 Auto Identity ...
Страница 1596: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 1514 Additional References ...
Страница 1604: ......
Страница 1740: ......
Страница 1764: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 1682 Additional References ...
Страница 1942: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 1860 cli_write ...
Страница 1950: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 1868 context_save ...
Страница 2058: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 1976 event_register_wdsysmon ...
Страница 2076: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 1994 smtp_subst ...
Страница 2090: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 2008 sys_reqinfo_syslog_history ...
Страница 2104: ...Consolidated Platform Configuration Guide Cisco IOS Release 15 2 4 E Catalyst 2960 X Switches 2022 unregister_counter ...
Страница 2105: ...P A R T XII Configuring Cisco IOS IP SLAs Configuring Cisco IP SLAs page 2025 ...
Страница 2106: ......
Страница 2118: ......
Страница 2164: ......