hit counter script

Configuration Examples For Writing Embedded Event Manager Policies Using Tcl - Cisco Catalyst 2960 series Configuration Manual

Consolidated platform configuration guide, ios release 15.2(4)e
Hide thumbs Also See for Catalyst 2960 series:
Table of Contents

Advertisement

Configuration Examples for Writing Embedded Event Manager Policies Using Tcl

Command or Action
Step 5
event syslog pattern regular-expression
Example:
Device(config-applet)# event syslog pattern
"count"
Step 6
action label syslog msg msg-text
Example:
Device(config-applet)# action 1 syslog msg
hi
Step 7
end
Example:
Device(config-applet)# end
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
page
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
1696.
Purpose
Specifies the event criteria for an Embedded Event Manager
(EEM) applet that is run by matching syslog messages.
Specifies the action to be taken when an EEM applet is
triggered.
• 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.
Registering and Defining an Embedded Event Manager Applet, on

Advertisement

Table of Contents
loading

Table of Contents