EEM allows you to automate tasks, perform minor enhancements and create workarounds. A Syslog Event detector: This example shows the syslog event detector. When the ISP1 interface has been shutdown, the below applet run to turn on the interface and send the alert to the below mention mail id with logged in users information. However, caution should be exercised to consider the file system free space before deploying the applet.
In this example, small TCL script configured to check reachability of Branch devices from the Core router. Thanks for giving wonderful information. It was very informative. Please can you help in this.
Thanks for your positive feedback and private mail; really appreciated. Icmp-echo x. Furhter will the 2nd EMM script will iterate and can create Loops or will it have any negative impact on the device it is configured on. And I want to create a script to display a traffic interface but I not know how. I did what you wrote but it didn't work. When i use: "Show event manager history events" it shows that my applet is active and had a track event. Does anyone know how to get EEM scripts to direct "show" command output or "more" command output to the console terminal?
It seems EEM suppresses "show run" commands. I need to have a script or a tool to ping to a next hop and send alert mails on even a single drop. Write to TFTP succesfully executed"! Buy or Renew. Find A Community. We're here for you! Turn on suggestions. Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for. Search instead for. Did you mean:. Labels: EEM Scripting.
EEM cisco. R1 debug event manager action cli Debug EEM action cli debugging is on R1 conf t Enter configuration commands, one per line. Current configuration : bytes!EEM offers the ability to monitor events and take informational, corrective, or any desired action when the monitored events occur or when a threshold is reached.
The EEM policy engine receives notifications when faults and other events occur. EEM policies implement recovery on the basis of the current state of the system and the actions specified in the policy for a given event. Recovery actions are triggered when the policy is run. Your software release may not support all the features documented in this module. For the latest feature information and caveats, see the release notes for your platform and software release.
To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the Feature Information Table at the end of this document.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www. An account on Cisco. EEM offers the ability to monitor events and take informational or corrective action when the monitored events occur or a threshold is reached. An EEM policy is an entity that defines an event and the actions to be taken when that event occurs.
There are two types of EEM policies: an applet or a script. An applet is a simple form of policy that is defined within the CLI configuration. A script is a form of policy that is written in Tool Command Language Tcl. An EEM applet is a concise method for defining event screening criteria and the actions to be taken when that event occurs. In applet configuration mode, three types of configuration statements are supported.
The event commands are used to specify the event criteria to trigger the applet to run, the action commands are used to specify an action to perform when the EEM applet is triggered, and the set command is used to set the value of an EEM applet variable.
Only one event configuration command is allowed within an applet configuration. When applet configuration mode is exited and no event command is present, a warning is displayed stating that no event is associated with this applet. If no event is specified, this applet is not considered registered.The Cisco software feature documentation in this configuration guide often includes information about features that are shared across software releases and platforms.
This guide may contain information that is not specific to your particular platform or is not supported in your software release. Additionally, some configuration guides contain content that may be superseded by documentation from a later software release. For the latest feature information and caveats, see the release notes for your platform and software release.
Additionally, use Cisco Feature Navigator to find information about feature, platform, and software image support. Any Internet Protocol IP addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers.
Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental. Skip to content Skip to footer. Search Find Matches in This Book. Book Table of Contents.object tracking and IP SLA
Was this Document Helpful? Yes No Feedback. Related Cisco Community Discussions.EEM uses event detectors and actions to provide notifications of those events. IOS Embedded Event Manager supports more than 20 event detectors that are highly integrated with different Cisco IOS Software components to trigger actions in response to network events.
The EEM feature is constantly evolving. EEM 1. Now, with EEM 3. To know what features of EEM your device has, you must first know what version it supports. If you are not running one of the main IOS version trains, this information may not be obvious. In fact, it may not be that easy to determine the version of EEM. Prior to EEM 2. As of EEM 2. To find out if your device supports at least EEM 1. If so, then your device supports EEM 1.
EEM 2. As of To determine if your device supports EEM 2. If this command is supported, then the device supports EEM 2. The primary feature added to EEM 2. However, even for devices which would otherwise support EEM 2.
For example, Catalyst s running Catalyst 3K switches e. The primary user-facing feature of EEM 2. Therefore, to determine if a device supports EEM 2. EEM built-in environment variables are a subset of the Cisco-defined environment variables and the built-in variables are available to EEM applets only.
The built-in variables can be read-only or read-write and may apply to one specific event detector or to all event detectors. Here are some examples:. The event cli pattern defines the event criteria to initialize the EEM applet.EEM allows the behavior of a Cisco device to adapt to specific user requirements by allowing scripting, thresholding, proactive actions, data collection and event management inside the Cisco device itself.
Embedded Event Manager Configuration Guide
Using EEM, problems can be identified and resolved automatically in advance by setting event triggers called Event Detectors to watch for specific types of situations or thresholds, or run a set of actions periodically. When a situation is detected by EEM, it uses policies to invoke actions based on the type of event and the configured policy.
EEM currently supports three different types of programming actions see Programming Capabilities below. With EEM, users can capture complex network events and run sophisticated programs on Cisco devices. The version of EEM on most Cisco devices is version 2. The latest version is version 4. The brains of EEM are event detectors. These event detectors are built-in capabilities to watch for specific situations or conditions.
Newer versions of EEM have more event detectors than older ones. Policies determine what is run when an event is detected. Policies save users from having to enumerate an action for every possible event.
There are four steps to setting up an EEM system. In this example, we will get an email of the status of the system when the HSRP state changes. This examples defines an applet action rather than Tcl. From Wikipedia, the free encyclopedia. The references in this article are unclear because of a lack of inline citations. Help Wikipedia improve by adding precise citations! November Learn how and when to remove this template message.
Categories : Cisco Systems.See the action set EEM command for more information. To set the value of a local Embedded Event Manager EEM applet variable, use the set command in applet configuration mode. To remove the value of an EEM applet variable, use the no form of this command. Unique identifier that can be any string value. Actions are sorted and run in ascending alphanumeric key sequence using the label as the sort key.
If the string contains embedded blanks, enclose it in double quotation marks. Integer value that represents the variable.
Zero represents a successful exit status, and a nonzero value represents a failed exit status. Support in a specific This command was replaced by the action set command. In EEM applet configuration mode, three types of configuration statements are supported. The event commands are used to specify the event criteria to trigger the applet to run, the action commands are used to specify an action to perform when the EEM applet is triggered, and the set command is used to set the value of an EEM applet variable.
Use the show event manager detector command to display information about EEM event detectors. The all keyword displays information about all event detectors. The detailed keyword displays detailed information, including:. The event registration syntax for the Tool Command Language Tcl policies. The built-in variables available when an applet policy is triggered by this event detector.
The following is sample output from the show event manager detector command specifying the counter value:. The following is sample output from the show event manager detector command specifying the identity value and details:.
To display the directory to use for storing user library files or user-defined Embedded Event Manager EEM policies, use the show event manager directory user command in privileged EXEC mode.To remove the application event criteria, use the no form of this command.
Optional Specifies a tag using the event-tag argument that can be used with the trigger command to support multiple event statements within an applet.
Number in the range from 1 to that identifies the subsystem. When an event is to be published by an EEM policy, the subsystem-id reserved for a policy is Optional Specifies the maximum runtime of the applet. If the maxrun keyword is specified, the maxruntime-number value must be specified. If the maxrun keyword is not specified, the default applet run time is 20 seconds. Optional Number of seconds specified in ssssssss[.
Support in a specific The tag and maxrun keywords were added to support multiple event statements within an applet. To remove the CLI command event criteria, use the no form of this command. Specifies the regular expression used to perform the CLI command pattern match. The CLI command must have been successfully parsed before the pattern match is attempted.
The pattern match is compared with the fully expanded CLI command string. Regular expression. If the expression contains embedded blanks, enclose it in double quotation marks. Optional The time period during which the CLI event detector waits for the policy to exit specified in ssssssssss[.
If the default time period expires before the policy exits, the default action will be executed. The default action is to run the command. If this argument is not specified, the default time period is set to 30 seconds. If the yes keyword is specified, the policy will run synchronously with the CLI command.
Embedded Event Manager Configuration Guide, Cisco IOS Release 12.4T
If the no keyword is specified, the policy will run asynchronously with the CLI command. Indicates whether the CLI command should be executed. This keyword is required if the sync keyword is followed by the no keyword. If the sync keyword is followed by the yes keyword, the skip keyword should not be specified. If the yes keyword is specified, the CLI command will not be executed.
If the no keyword is specified, the CLI command will be executed. This is the default. When the skip keyword is followed by the yes keyword, unintended results may be produced if the pattern match is made for configuration commands because the CLI command that matches the regular expression will not be executed.