Embedded Event Manager System Events and Configuration Examples
Configuration Examples for EEM Policies
Configuration Examples for CLI Events
Monitoring Interface Shutdown
This example shows how to monitor an interface shutdown:
switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# event manager applet monitorShutdown
switch(config-applet)#
switch(config-applet)# description "Monitors interface shutdown."
switch(config-applet)# event cli match "conf t; interface *; shutdown"
switch(config-applet)# action 1.0 cli show interface e 3/1
switch(config)# copy running-config startup-config
Note
Outputs of show commands entered as part of EEM policy are archived in the logflash as text files with
the "eem_archive_" prefix. To view the archived output, use the show file logflash:eem_archive_n
command.
Monitoring Module Powerdown
This example shows how to monitor a module powerdown:
switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# event manager applet monitorPoweroff
switch(config-applet)#
switch(config-applet)# description "Monitors module power down."
switch(config-applet)# event cli match "conf t ; poweroff *"
switch(config-applet)# action 1.0 cli show module
switch(config)# copy running-config startup-config
Adding a Trigger to Initiate a Rollback
This example shows how to add a trigger to initiate a rollback:
switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#
switch(config)# event manager applet rollbackTrigger
switch(config-applet)#
switch(config-applet)# description "Rollback trigger."
switch(config-applet)# event cli match "rollback *"
switch(config-applet)# action 1.0 cli copy running-config bootflash:last_config
switch(config)# copy running-config startup-config
Cisco Nexus 7000 Series NX-OS System Management Configuration Guide
Configuration Examples for EEM Policies
413