Verifying The Eem Configuration - Cisco Nexus 5600 Series Configuration Manual

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

Advertisement

Configuring EEM
Step 8
Sample Python file (Python.py). Copy this file to the bootflash.
import re
import cisco
cisco.cli ("show interface eth 1/1-32 transceiver detail >> bootflash:link_flap.txt")
This example shows how to define a user policy by using the CLI and invoking a Python script by using the
action statement once the event is triggered:
switch# configure terminal
switch(config)# event manager applet PYTHON
switch(config-applet)# description "Triggers PYTHON Script"
switch(config-applet)# event cli match "shutdown"
switch(config-applet)# action 1.0 cli local python bootflash:Python.py
switch(config-applet)# copy running-config startup-config

Verifying the EEM Configuration

To display EEM configuration information, enter one of the following commands:
Command
show event manager environment [variable-name
| all]
show event manager event-types [event | all |
module slot]
show event manager history events [detail]
[maximum num-events] [severity {catastrophic |
minor | moderate | severe}]
show event manager policy internal [policy-name]
[inactive]
show event manager policy-state policy-name
show event manager script system [policy-name |
all]
show event manager system-policy [all]
OL-31641-01
Command or Action
switch(config-applet)# copy
running-config startup-config
Cisco Nexus 5600 Series NX-OS System Management Configuration Guide, Release 7.x
Verifying the EEM Configuration
Purpose
Saves the change persistently through reboots and
restarts by copying the running configuration to the
startup configuration.
Purpose
Displays information about the event manager
environment variables.
Displays information about the event manager event
types.
Displays the history of events for all policies.
Displays information about the configured policies.
Displays information about the policy state, including
thresholds.
Displays information about the script policies.
Displays information about the predefined system
policies.
251

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents