EEM on NX-OS [Explained & Configuration]

What is EEM (Embedded Event Manager):

EEM monitors events that occur on your device and takes action to recover or troubleshoot these events, based on your configuration.

EEM consists of three major components:

  • Event statements: Events to monitor from another Cisco NX-OS component that may require some action, workaround, or notification.
  • Action statements: An action that EEM can take, such as executing CLI commands, sending an email through the use of Smart Call Home feature, and disabling an interface to recover from an event.
  • Policies: An event that is paired with one or more actions to troubleshoot or recover from the event.

–> You must have network-admin user privileges to configure EEM.

EEM Policy Statements:

EEM Policy Statements

You can configure EEM policies using the command-line interface (CLI) or a VSH script.

EEM gives you a device-wide view of policy management. You configure EEM policies on the supervisor, and EEM pushes the policy to the correct module based on the event type. EEM takes any actions for a triggered event either locally on the module or on the supervisor (the default option).


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.



EEM Configuration on NX-OS:

Step-1: Registers the applet with EEM and enters applet configuration mode:

syntax: event manager applet applet-name


switch(config)# event manager applet monitorShutdown
switch(config-applet)#Code language: PHP (php)

Step-2: Configures the event statement for the policy:

Repeat this step for multiple event statements.

syntax: event event-statement

switch(config-applet)# event cli match “conf t ; interface * ; shutdoCode language: PHP (php)

Optional: Correlates multiple events in the policy:

You can trigger an EEM policy based on a combination of events. First, you use the tag keyword to create and differentiate multiple events in the EEM policy. Then using a set of boolean operators (and, or, andnot), along with the count and time, you can define a combination of these events to trigger a custom action.

Step-3: Configures an action statement for the policy:

Repeat this step for multiple action statements.

Syntax: action number[.number2action-statement

switch(config-applet)# action 1.0 cli show interface e 3/1Code language: PHP (php)





Guidelines and Limitations for EEM

EEM has the following configuration guidelines and limitations:

  • The maximum number of configurable EEM policies is 500.
  • Action statements within your user policy or overriding policy should not negate each other or adversely affect the associated system policy.
  • If you want to allow a triggered event to process any default actions, you must configure the EEM policy 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.
  • An override policy without an event statement overrides all possible events in the system policy.
  • When more than one event statement is included in an EEM policy, each event statement must have a tag keyword with a unique tag argument.
  • EEM event correlation does not override the system default policies.
  • Default action execution is not supported for policies that are configured with tagged events.

Bilel

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x