This example shows how to define an environment variable:
switch# configure terminal
switch(config)# event manager environment emailto "admin@anyplace.com"
switch(config)# show event manager environment all
switch(config)# copy running-config startup-config
Defining a User Policy Using the CLI
You can define a user policy using the CLI.
Before You Begin
Make sure that you are in the correct VDC. To change the VDC, use the switchto vdc command.
Procedure
PurposeCommand or Action
Enters global configuration mode.switch# configure terminal
Step 1
Registers the applet with EEM and enters applet
configuration mode. The applet-name can be any
case-sensitive, alphanumeric string up to 29 characters.
switch(config)# event manager applet
applet-name
Step 2
(Optional)
Configures a descriptive string for the policy. The string
can be any alphanumeric string up to 80 characters.
Enclose the string in quotation marks.
switch(config-applet)# description
policy-description
Step 3
Configures the event statement for the policy. See Event
Statement Configuration, on page 242.
switch(config-applet)# event
event-statement
Step 4
Repeat Step 4 for multiple event statements.
(Optional)
Correlates multiple events in the policy.
switch(config-applet)# tag tag {and |
andnot | or} tag [and | andnot | or
{tag}] {happens occurs in seconds}
Step 5
The range for the occurs argument is from 1 to
4294967295. The range for the seconds argument is
from 0 to 4294967295 seconds.
Configures an action statement for the policy. See Action
Statement Configuration, on page 244.
switch(config-applet)# action
number[.number2] action-statement
Step 6
Repeat Step 6 for multiple action statements.
Displays information about the status of the configured
policy.
switch(config-applet)# show event
manager policy-state name [module
module-id]
Step 7
Saves the change persistently through reboots and
restarts by copying the running configuration to the
startup configuration.
switch(config-applet)# copy
running-config startup-config
Step 8
Cisco Nexus 5600 Series NX-OS System Management Configuration Guide, Release 7.x    
   OL-31641-01 241
Configuring EEM
Defining a User Policy Using the CLI