- New and Changed Information
- Preface
- Overview
- Configuring CFS
- Configuring NTP
- Configuring PTP
- Configuring CDP
- Configuring System Message Logging
- Configuring Smart Call Home
- Configuring Rollback
- Configuring Session Manager
- Configuring the Scheduler
- Configuring SNMP
- Configuring RMON
- Configuring Online Diagnostics
- Configuring the Embedded Event Manager
- Configuring Onboard Failure Logging
- Configuring SPAN
- Configuring ERSPAN
- Configuring LLDP
- Configuring NetFlow
- Supported RFCs
- EEM Events and Examples
- Configuration Limits for Cisco NX-OS System Management
- EEM System Policies
- EEM Events
- Configuration Examples for EEM Policies
- Configuration Examples for CLI Events
- Configuration Examples to Override (Disable) Major Thresholds
- Preventing a Shutdown When Reaching a Major Threshold
- Disabling One Bad Sensor
- Disabling Multiple Bad Sensors
- Overriding (Disabling) an Entire Module
- Overriding (Disabling) Multiple Modules and Sensors
- Enabling One Sensor While Disabling All Remaining Sensors of All Modules
- Enabling Multiple Sensors While Disabling All Remaining Sensors of All Modules
- Enabling All Sensors of One Module While Disabling All Sensors of the Remaining Modules
- Enabling a Combination of Sensors on Modules While Disabling All Sensors of the Remaining Modules
- Configuration Examples to Override (Disable) Shutdown for Fan Tray Removal
- Overriding (Disabling) a Shutdown for Removal of One or More Fan Trays
- Overriding (Disabling) a Shutdown for Removal of a Specified Fan Tray
- Overriding (Disabling) a Shutdown for Removal of Multiple Specified Fan Trays
- Overriding (Disabling) a Shutdown for Removal of All Fan Trays Except One
- Overriding (Disabling) a Shutdown for Removal of Fan Trays Except for a Specified Set of Fan Trays
- Overriding (Disabling) a Shutdown for Removal of All Fan Trays Except One from a Set of Fan Trays
- Configuration Examples to Create a Supplemental Policy
- Configuration Examples for the Power Over-Budget Policy
- Configuration Examples to Select Modules to Shut Down
- Configuration Examples for the Online Insertion Removal Event
- Configuration Example to Generate a User Syslog
- Configuration Example to Monitor Syslog Messages
- Configuration Examples for SNMP Notification
- Configuration Example for Port Tracking
- Feature History for EEM Policies
Embedded Event Manager System Events and Configuration Examples
This appendix describes the Embedded Event Manager (EEM) system policies, events, and policy configuration examples.
EEM System Policies
Table 23-1 lists the Embedded Event Manger (EEM) system policies.
EEM Events
Table 23-2 describes the EEM events you can use on the device.
Configuration Examples for EEM Policies
This section includes the following topics:
- Configuration Examples for CLI Events
- Configuration Examples to Override (Disable) Major Thresholds
- Configuration Examples to Override (Disable) Shutdown for Fan Tray Removal
- Configuration Examples to Create a Supplemental Policy
- Configuration Examples for the Power Over-Budget Policy
- Configuration Examples to Select Modules to Shut Down
- Configuration Examples for the Online Insertion Removal Event
- Configuration Example to Generate a User Syslog
- Configuration Example to Monitor Syslog Messages
- Configuration Examples for SNMP Notification
- Configuration Example for Port Tracking
Configuration Examples for CLI Events
This section includes the following examples of CLI event configuration:
Monitoring Interface Shutdown
This example shows how to monitor an interface shutdown:
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.
Adding a Trigger to Initiate a Rollback
This example shows how to add a trigger to initiate a rollback:
Configuration Examples to Override (Disable) Major Thresholds
This section includes the following topics:
- Preventing a Shutdown When Reaching a Major Threshold
- Disabling One Bad Sensor
- Disabling Multiple Bad Sensors
- Overriding (Disabling) an Entire Module
- Overriding (Disabling) Multiple Modules and Sensors
- Enabling One Sensor While Disabling All Remaining Sensors of All Modules
- Enabling Multiple Sensors While Disabling All Remaining Sensors of All Modules
- Enabling All Sensors of One Module While Disabling All Sensors of the Remaining Modules
- Enabling a Combination of Sensors on Modules While Disabling All Sensors of the Remaining Modules
Preventing a Shutdown When Reaching a Major Threshold
This example shows how to prevent a shutdown caused by reaching a major threshold:
This example shows how to revert to the default configuration:
Disabling One Bad Sensor
This example shows how to disable only sensor 3 on module 2 when sensor 3 is malfunctioning (all other sensors are unaffected):
This example shows how to revert to the default configuration:
Disabling Multiple Bad Sensors
This example shows how to disable sensors 5, 6, and 7 on module 2 when these sensors are malfunctioning (all other sensors are unaffected):
This example shows how to revert to the default configuration:
Overriding (Disabling) an Entire Module
This example shows how to disable module 2 when it is malfunctioning:
This example shows how to revert to the default configuration:
Overriding (Disabling) Multiple Modules and Sensors
This example shows how to disable sensors 3, 4, and 7 on module 2 and all sensors on module 3 when they are malfunctioning:
This example shows how to revert to the default configuration:
Enabling One Sensor While Disabling All Remaining Sensors of All Modules
This example shows how to disable all sensors on all modules except sensor 4 on module 9:
Enabling Multiple Sensors While Disabling All Remaining Sensors of All Modules
This example shows how to disable all sensors on all modules except sensors 4, 6, and 7 on module 9:
Enabling All Sensors of One Module While Disabling All Sensors of the Remaining Modules
This example shows how to disable all sensors on all modules except all sensors on module 9:
Enabling a Combination of Sensors on Modules While Disabling All Sensors of the Remaining Modules
This example shows how to disable all sensors on all modules except sensors 3, 4, and 7 on module 2 and all sensors on module 3:
Configuration Examples to Override (Disable) Shutdown for Fan Tray Removal
This section includes the following topics:
- Overriding (Disabling) a Shutdown for Removal of One or More Fan Trays
- Overriding (Disabling) a Shutdown for Removal of a Specified Fan Tray
- Overriding (Disabling) a Shutdown for Removal of Multiple Specified Fan Trays
- Overriding (Disabling) a Shutdown for Removal of All Fan Trays Except One
- Overriding (Disabling) a Shutdown for Removal of Fan Trays Except for a Specified Set of Fan Trays
- Overriding (Disabling) a Shutdown for Removal of All Fan Trays Except One from a Set of Fan Trays
Note When you remove a fan tray from a Cisco Nexus 7010 switch, a shutdown does not occur. The remaining fan tray increases its speed, and a message is written to the syslog.
Note When you remove a fan tray from a Cisco Nexus 7018 switch, the switch starts a 3-minute timer. If you do not replace the fan tray within that 3 minutes, the switch shuts down the modules cooled by that timer to prevent an overtemperature condition. If you override the timer with an EEM command, an overtemperature condition can occur, which will cause a shutdown.
Overriding (Disabling) a Shutdown for Removal of One or More Fan Trays
This example shows how to disable a shutdown so that you can remove one or more (or all) fan trays:
This example shows how to revert to the default configuration:
Overriding (Disabling) a Shutdown for Removal of a Specified Fan Tray
This example shows how to disable a shutdown so that you can remove a specified fan tray (fan tray 3):
This example shows how to revert to the default configuration:
Overriding (Disabling) a Shutdown for Removal of Multiple Specified Fan Trays
This example shows how to disable a shutdown so that you can remove multiple specified fan trays (fan trays 2, 3, and 4):
This example shows how to revert to the default configuration:
Overriding (Disabling) a Shutdown for Removal of All Fan Trays Except One
This example shows how to disable a shutdown so that you can remove all fan trays except one (fan tray 2):
Overriding (Disabling) a Shutdown for Removal of Fan Trays Except for a Specified Set of Fan Trays
This example shows how to disable a shutdown so that you can remove fans except for a specified set of fan trays (fan trays 2, 3, and 4):
Overriding (Disabling) a Shutdown for Removal of All Fan Trays Except One from a Set of Fan Trays
This example shows how to disable a shutdown so that you can remove all fan trays except one from a set of fan trays (fan trays 2, 3, or 4):
Creating a Supplemental Policy for the Fan Tray Absent Event
This example shows how to create a supplemental policy using the event fanabsent command:
[ no ] event fanabsent [ fan fan-tray-number ] time time-interval
In addition to the default policy, this example shows how to execute the policy myappletname and action 3 if fan tray 1 is absent for 60 seconds:
Creating a Supplemental Policy for the Temperature Threshold Event
This example shows how to create a supplemental policy using the event temperature command:
[ no ] event temperature [ mod module-number ] [ sensor sensor-number ] threshold { major | minor | any }
In addition to the default policy, this example shows how to execute the policy myappletname and action 1 if the temperature crosses the minor threshold on sensor 3 of module 2:
Configuration Examples for the Power Over-Budget Policy
The power over-budget policy gets triggered when the available power capacity drops below zero and the device is no longer able to keep the previously powered-up modules in the powered-up state. The default action is to print a syslog to notify the user of the occurrence of power over budget.
You can enable an additional action to power down modules until the available power recovers from the red (negative) zone.
Shutting Down Modules
If you do not specify any modules, the power over-budget shutdown starts from slot 1 and shuts down modules until the power recovers from the red (negative) zone. Empty slots and slots that contain a supervisor, standby supervisor, spine, or crossbar are skipped.
This example shows how to shut down modules starting from module 1 when the available power drops below zero:
Shutting Down a Specified List of Modules
You can specify a list of modules that the power over-budget action uses to shut down modules until the power recovers from the red (negative) zone. Empty slots and slots that contain a supervisor, standby supervisor, spine, or crossbar are skipped.
This example shows how to shut down modules from a specified list of modules (1, 2, 7, 8) when the available power drops below zero:
Using the Policy Default to Select Nonoverridden Modules to Shut Down
This example shows how to use the policy default to select the nonoverridden modules to shut down when a major threshold is exceeded:
Using Parameter Substitution to Select Nonoverridden Modules to Shut Down
This example shows how to use parameter substitution to select the nonoverridden modules to shut down when a major threshold is exceeded:
To create event manager parameters, use the event manager environment command. To display the values of event manager parameters, use the show event manager environment all command.
Configuration Examples for the Online Insertion Removal Event
The online insertion removal (OIR) event does not have a default policy.
This example shows how to configure the OIR event using the event oir command:
event oir device-type event-type [ device-number ]
The device-type can be fan , module or powersupply .
The event-type can be insert , remove , or anyoir (insert or remove).
The optional device-number specifies a single device. If omitted, all devices are selected.
Configuration Example to Generate a User Syslog
This example shows how to generate a user syslog using the action syslog command:
When this event is triggered, the system generates a syslog as follows:
Configuration Example to Monitor Syslog Messages
This example shows how to monitor syslog messages from the switch:
When this event is triggered, the action defined in the policy is executed.
Polling an SNMP OID to Generate an EEM Event
The SNMP object ID (OID) CISCO-SYSTEM-EXT-MIB::cseSysCPUUtilization is used for querying the CPU utilization of the switch:
This example shows the use of an SNMP OID that is polled at an interval of 10 seconds and has a threshold value of 95 percent:
Sending an SNMP Notification in Response to an Event in the Event Policy
You can use this type of configuration to cause a critical event trigger to generate an SNMP notification.
This example shows how to send an SNMP notification for an event from the Event Manager applet configuration mode:
This configuration triggers an SNMP notification (trap) from the switch to SNMP hosts. The SNMP payload carries the values of user-defined fields intdata1, intdata2, and strdata.
Configuration Example for Port Tracking
This example shows how to configure the state of one port to match the state of another port (port tracking).
To configure the port tracking of Ethernet interface 3/23 by Ethernet interface 1/2, follow these steps:
Step 1 Create an object to track the status of Ethernet interface 3/23.
Step 2 Configure an EEM event to shut Ethernet interface 1/2 when the tracking object shuts down.
Step 3 Configure an EEM event to bring up Ethernet interface 1/2 when Ethernet interface 3/23 comes up.
Feature History for EEM Policies
Table 23-3 lists the release history for this feature.
Added support for multiple event triggers in a single EEM policy. See the configuration example in Chapter16, “Configuring the Embedded Event Manager” |
||
Updated the fan EEM policies for the Cisco Nexus 7010 switch. |
Feedback