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 condition
Step 3
Sets an action for the event.
action label
set
Step 4
Example:
Device(config-applet)#
action 1.0 set i 2
•
In this example, the value of the variable i is set to 2.
Specifies a loop of a conditional block.
action label while string_op1 operator string_op2
Step 5
Example:
Device(config-applet)# action 2 while $i lt 10
•
In this example, a loop is set to check if the value of
the variable i is less than 10.
Performs the action as indicated by the action command.
Add any action as required.
Step 6
Example:
Device(config-applet)#
action 3 syslog msg "i
is $i"
•
In this example, the message
‘
i is $_i
’
is written to the
syslog.
Exits from the running action.
action label
end
Example:
Device(config-applet)#
action 3 end
Step 7
Specifying if else Conditional Blocks
To specify the beginning of an if conditional statement followed by an else conditional statement, perform
this task. The if or else conditional statements can be used in conjunction with each other or separately. In
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1734
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: ......