Consolidated Platform Configuration Guide, Cisco Ios Release 15.2(4)E (Catalyst 2960-X Switches - 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

this task, the value of a variable is set to 5. An if conditional block is then specified to check if the value of
the variable is less than 10. Provided the if conditional block is satisfied, an action command to output the
message 'x is less than 10' is specified.
Following the if conditional block, an else conditional block is specified. Provided the if conditional block is
not satisfied, an action command to output the message 'x is greater than 10' is specified.
SUMMARY STEPS
1. enable
2. configure terminal
3. event manager applet applet-name
4. action label set variable-name variable-value
5. action label if [stringop1] {eq | gt | ge | lt | le | ne} [stringop2]
6. Add any action as required.
7. action label else
8. Add any action as required.
9. end
DETAILED STEPS
Command or Action
Step 1
enable
Example:
Device> enable
Step 2
configure terminal
Example:
Device# configure terminal
Step 3
event manager applet applet-name
Example:
Device(config)# event manager applet
ifcondition
Step 4
action label set variable-name variable-value
Example:
Device(config-applet)# action 1.0 set x 5
Step 5
action label if [stringop1] {eq | gt | ge | lt | le | ne}
[stringop2]

Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)

How to Write EEM Policies Using the Cisco IOS CLI
Purpose
Enables privileged EXEC mode.
• Enter your password if prompted.
Enters global configuration mode.
Registers the applet with the Embedded Event Manager
(EEM) and enters applet configuration mode.
Sets an action for the event.
• In this example, the value of the variable x is set to 5.
Specifies an if conditional statement.
• In this example, an if conditional statement to check
if the value of the variable is less than 10.
1735

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents