Event Statement Configuration
This example shows how to define a user policy by using the CLI:
switch# configure terminal
switch(config)# event manager applet monitorShutdown
switch(config-applet)# description "Monitors interface shutdown."
switch(config-applet)# event cli match "shutdown"
switch(config-applet)# tag one or two happens 1 in 10000
switch(config-applet)# action 1.0 cli local show interface e 3/1
switch(config-applet)# show event manager policy-state monitorShutdown
switch(config-applet)# copy running-config startup-config
Event Statement Configuration
Use one of the following commands in EEM configuration mode to configure an event statement:
Command
event cli [tag tag] match expression [count repeats
| time seconds]
Example:
switch(config-applet)# event cli match "shutdown"
event counter [tag tag] name counter entry-val entry
entry-op {eq | ge | gt | le | lt |ne} [exit-val exit exit-op
{eq | ge | gt | le | lt | ne}]
Example:
switch(config-applet)# event counter name mycounter
entry-val 20 gt
event fanabsent [fan number] time seconds
Example:
switch(config-applet)# event fanabsent time 3000
event fanbad [fan number] time seconds
Example:
switch(config-applet)# event fanbad time 3000
Cisco Nexus 5600 Series NX-OS System Management Configuration Guide, Release 7.x
242
Purpose
Triggers an event if you enter a command that
matches the regular expression.
The tag tag keyword-argument pair identifies this
specific event when multiple events are included in
the policy.
The repeats argument range is from 1 to 65000. The
seconds argument range is from 0 to 4294967295,
where 0 indicates no time limit.
Enclose the string in quotation marks.
Triggers an event if the counter crosses the entry
threshold based on the entry operation. The event
resets immediately. Optionally, you can configure the
event to reset after the counter passes the exit
threshold.
The tag tag keyword-argument pair identifies this
specific event when multiple events are included in
the policy.
The counter name can be any case-sensitive,
alphanumeric string up to 28 characters. The entry
and exit value ranges are from 0 to 2147483647.
Triggers an event if a fan is removed from the device
for more than the configured time, in seconds. The
number range is module dependent.
The seconds range is from 10 to 64000.
Triggers an event if a fan fails for more than the
configured time, in seconds. The number range is
module dependent. The seconds range is from 10 to
64000.
Configuring EEM
OL-31641-01