Purpose
Command or Action
Exits from the running action.
action label
end
Example:
Device(config-applet)# action 4.0 end
Step 6
Using Regular Expressions
To match a regular expression pattern with an input string, perform this task. Using regular expressions, you
can specify the rules for a set of possible strings to be matched.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
event manager applet applet-name
4.
action label regexp string-pattern string-input
[
string-match
[
string-submatch1
] [
string-submatch2
]
[
string-submatch3
]]
DETAILED STEPS
Purpose
Command or Action
Enables privileged EXEC mode.
enable
Step 1
Example:
Device> enable
•
Enter your password if prompted.
Enters global configuration mode.
configure terminal
Example:
Device#
configure terminal
Step 2
Registers the applet with the Embedded Event Manager (EEM)
and enters applet configuration mode.
event manager applet applet-name
Example:
Device(config)#
event manager applet
regexp
Step 3
Specifies an expression pattern to match with an input string.
action label regexp string-pattern string-input
[
string-match
[
string-submatch1
] [
string-submatch2
]
[
string-submatch3
]]
Step 4
•
In this example, an input string of
‘
red blue green
’
is
specified. When the expression pattern matches the input
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1738
How to Write EEM Policies Using the Cisco IOS CLI
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: ......