Defining A User Policy Using The Cli To Trigger A Tcl Script - Cisco Nexus 5600 Series Configuration Manual

Nx-os system management
Hide thumbs Also See for Nexus 5600 Series:
Table of Contents

Advertisement

Configuring EEM

Defining a User Policy Using the CLI to Trigger a Tcl Script

Before You Begin
Copy the Tcl script which is triggered through an EEM policy to the bootflash of the switch.
Procedure
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
Step 8
Sample Tcl file (Vlan.tcl). Copy this file to the bootflash. Running the file creates 99 VLANs and names
them.
set i 1
while {$i<100} {
cli configure terminal
cli vlan $i
cli name VLAN$i
cli no shutdown
OL-31641-01
Command or Action
switch# configure terminal
switch(config)# event manager applet
applet-name
switch(config-applet)# description
policy-description
switch(config-applet)# event
event-statement
switch(config-applet)# tag tag {and |
andnot | or} tag [and | andnot | or
{tag}] {happens occurs in seconds}
switch(config-applet)# action
number[.number2]
action-statementtcl-filename
switch(config-applet)# show event
manager policy-state name [module
module-id]
switch(config-applet)# copy
running-config startup-config
Cisco Nexus 5600 Series NX-OS System Management Configuration Guide, Release 7.x
Defining a User Policy Using the CLI to Trigger a Tcl Script
Purpose
Enters global configuration mode.
Registers the applet with EEM and enters applet
configuration mode. The applet-name can be any
case-sensitive, alphanumeric string up to 29 characters.
(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.
Configures the event statement for the policy. See
Statement Configuration, on page
Repeat Step 4 for multiple event statements.
(Optional)
Correlates multiple events in the policy.
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
Repeat Step 6 for multiple action statements.
Displays information about the status of the configured
policy.
Saves the change persistently through reboots and
restarts by copying the running configuration to the
startup configuration.
Event
242.
244.
249

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents