Purpose
Command or Action
Specifies the event criteria for an Embedded Event Manager
(EEM) applet that is run by matching syslog messages.
event syslog pattern regular-expression
Example:
Device(config-applet)# event syslog pattern
"count"
Step 5
Specifies the action to be taken when an EEM applet is
triggered.
action label syslog msg msg-text
Example:
Device(config-applet)# action 1 syslog msg
hi
Step 6
•
In this example, the action taken is to write a message to
syslog.
•
The
msg-text
argument can be character text, an
environment variable, or a combination of the two.
Exits applet configuration mode and returns to privileged EXEC
mode.
end
Example:
Device(config-applet)# end
Step 7
Configuration Examples for Writing Embedded Event Manager Policies Using
Tcl
Embedded Event Manager Applet Configuration Examples
The following examples show how to create an EEM applet for some of the EEM event detectors. These
examples follow steps outlined in the
Registering and Defining an Embedded Event Manager Applet, on
page 1696
.
Application-Specific Event Detector
The following example shows how a policy named EventPublish_A runs every 20 seconds and publishes an
event type numbered 1 to an EEM subsystem numbered 798. The subsystem value of 798 specifies that a
publish event has occurred from an EEM policy. A second policy named EventPublish_B is registered to run
when the EEM event type 1 occurs with subsystem 798. When the EventPublish_B policy runs, it sends a
message to syslog containing data passed as an argument from the EventPublish_A policy.
event manager applet EventPublish_A
event timer watchdog time 20.0
action 1.0 syslog msg "Applet EventPublish_A"
action 2.0 publish-event sub-system 798 type 1 arg1 twenty
exit
event manager applet EventPublish_B
event application sub-system 798 type 1
action 1.0 syslog msg "Applet EventPublish_B arg1 $_application_data1"
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1744
Configuration Examples for Writing Embedded Event Manager Policies Using Tcl
Summary of Contents for Catalyst 2960 Series
Page 96: ......
Page 196: ......
Page 250: ......
Page 292: ......
Page 488: ......
Page 589: ...P A R T VI Cisco Flexible NetFlow Configuring NetFlow Lite page 509 ...
Page 590: ......
Page 619: ...P A R T VII QoS Configuring QoS page 539 Configuring Auto QoS page 645 ...
Page 620: ......
Page 750: ......
Page 1604: ......
Page 1740: ......
Page 2105: ...P A R T XII Configuring Cisco IOS IP SLAs Configuring Cisco IP SLAs page 2025 ...
Page 2106: ......
Page 2118: ......
Page 2164: ......