Action Statements; Vsh Script Policies; Environment Variables - Cisco Nexus 9000 Series Configuration Manual

Nx-os system management configuration guide, release 6.x
Hide thumbs Also See for Nexus 9000 Series:
Table of Contents

Advertisement

Action Statements

Action Statements
Action statements describe the action triggered by a policy. Each policy can have multiple action statements.
If no action is associated with a policy, EEM still observes events but takes no actions.
EEM supports the following actions in action statements:
• Execute any CLI commands.
• Update a counter.
• Log an exception.
• Force the shutdown of any module.
• Reload the device.
• Shut down specified modules because the power is over budget.
• Generate a syslog message.
• Generate a Call Home event.
• Generate an SNMP notification.
• Use the default action for the system policy.
If you want to allow the triggered event to process any default actions, you must configure the EEM policy
Note
to allow the default action. For example, if you match a CLI command in a match statement, you must
add the event-default action statement to the EEM policy or EEM will not allow the CLI command to
execute.
Verify that your action statements within your user policy or overriding policy do not negate each other
Note
or adversely affect the associated system policy.

VSH Script Policies

You can also write policies in a VSH script, using a text editor. These policies have an event statement and
action statement(s) just as other policies, and these policies can either augment or override system policies.
After you write your VSH script policy, copy it to the device and activate it.

Environment Variables

You can define environment variables for EEM that are available for all policies. Environment variables are
useful for configuring common values that you can use in multiple policies. For example, you can create an
environment variable for the IP address of an external e-mail server.
You can use an environment variable in action statements by using the parameter substitution format.
Cisco Nexus 9000 Series NX-OS System Management Configuration Guide, Release 6.x
160
Configuring the Embedded Event Manager

Advertisement

Table of Contents
loading

Table of Contents