Embedded Event Manager
This chapter describes how to configure the Embedded Event Manager (EEM).
- Information About the EEM
- Licensing Requirements for the EEM
- Guidelines and Limitations
- Creating an Event Manager Applet
- Configuring a Syslog Event
- Configuring a Watchdog (Periodic) Timer Event
- Configuring a Countdown (One-shot) Timer Event
- Configuring an Absolute (Once-A-Day) Timer Event
- Configuring a Crash Event
- Configuring an Action on an Event Manager Applet
- Configuring Destinations for Output from an Action
- Running an Event Manager Applet
- Invoking an Event Manager Applet Manually
- Configuration Examples for the EEM
- Monitoring the EEM
- Feature History for the EEM
Information About the EEM
The EEM feature enables you to debug problems and provides general purpose logging for troubleshooting. There are two components: events to which the EEM responds or listens, and event manager applets that define actions as well as the events to which the EEM responds. You may configure multiple event manager applets to respond to different events and perform different actions.
Supported Events
The EEM supports the following events:
- Syslog—The ASA uses syslog message IDs to identify syslog messages that trigger an event manager applet. You may configure multiple syslog events, but the syslog message IDs may not overlap within a single event manager applet.
- Timers—You may use timers to trigger events. You may configure each timer only once for each event manager applet. Each event manager applet may have up to three timers. The three types of timers are the following:
– Watchdog (periodic) timers trigger an event manager applet after the specified time period following the completion of the applet’s actions and restart automatically.
– Countdown (one-shot) timers trigger an event manager applet once after the specified time period and do not restart unless they are removed, then re-added.
– Absolute (once-a-day) timers cause an event to occur once a day at a specified time, and restart automatically. The time-of-day format is in hh:mm:ss.
You may configure only one timer event of each type for each event manager applet.
- None—The none event is triggered when you run an event manager applet manually using the CLI or ASDM.
- Crash—The crash event is triggered when the ASA crashes. Regardless of the value of the output command, the action commands are directed to the crashinfo file. The output is generated before the show tech command.
Configuring Actions
When an event manager applet is triggered, the actions on the event manager applet are performed. Each action has a number that is used to specify the sequence of the actions. The sequence number must be unique within an event manager applet. You may configure multiple actions for an event manager applet. The commands are typical CLI commands, such as show blocks.
Configuring Output Destinations
– You may send the output from the actions to a specified location using the output command. Only one output value may be enabled at any one time. The default value is output none. This value discards any output from the action commands. The command runs in global configuration mode as a user with privilege level 15 (the highest). The command may not accept any input, because it is disabled.
Licensing Requirements for the EEM
The following table shows the licensing requirements for this feature:
|
|
---|---|
Guidelines and Limitations
This section includes the guidelines and limitations for this feature.
Supported in single mode only. Not suported in multiple context mode.
Supported in routed and transparent firewall modes.
- During a crash, the state of the ASA is generally unknown. Some commands may not be safe to run during this condition.
- The name of an event manager applet may not contain spaces.
- You cannot modify the None event and Crashinfo event parameters.
- Performance may be affected because syslog messages are sent to the EEM for processing.
- The default output is output none for each event manager applet. To change this setting, you must enter a different output value.
- You may have only one output option defined for each event manager applet.
Creating an Event Manager Applet
To create an event manager applet that links events with actions and output, perform the following steps:
Configuring a Syslog Event
To configure a syslog event, enter the following command:
Configuring a Watchdog (Periodic) Timer Event
To configure a watchdog (periodic) timer event, enter the following command:
Configuring a Countdown (One-shot) Timer Event
To configure a countdown (one-shot) timer event, enter the following command:
Configuring an Absolute (Once-A-Day) Timer Event
To configure an absolute (once-a-day) timer event, enter the following command:
Configuring a Crash Event
To configure a crash event, enter the following command:
Configuring an Action on an Event Manager Applet
To configure an action on an event manager applet, enter the following command:
Configuring Destinations for Output from an Action
To configure specific destinations for sending output from an action, enter one of the following commands:
|
|
---|---|
|
Discards any output from the action commands, which is the default setting. |
New Set of Rotated Files Option
Single Overwritten File Option
Running an Event Manager Applet
To run an event manager applet, enter the following command:
Invoking an Event Manager Applet Manually
To invoke an event manager applet manually, enter the following command:
|
|
---|---|
|
Invokes an event manager applet manually. To remove the manual invocation of an event manager applet, enter the no event none command. |
Configuration Examples for the EEM
The following example shows an event manager applet that records block leak information every hour and writes the output to a rotating set of log files, keeping a day's worth of logs:
#
event manager applet blockcheck
#
description “Log block usage”
#
event timer watchdog time 3600
#
output rotate 24
#
action 1 cli command “show blocks old”
The following example shows an event manager applet that reboots the ASA every day at 1 am, saving the configuration as needed:
#
event manager applet dailyreboot
#
description “Reboot every night”
#
event timer absolute time 1:00:00
#
output none
#
action 1 cli command “reload save-config noconfirm”
The following example shows event manager applets that disable the given interface between midnight and 3 am.
#
event manager applet disableintf
#
description “Disable the interface at midnight”
#
event timer absolute time 0:00:00
#
output none
#
action 1 cli command “interface GigabitEthernet 0/0”
#
action 2 cli command “shutdown”
#
action 3 cli command “write memory”
#
event manager applet enableintf
#
description “Enable the interface at 3am”
#
event timer absolute time 3:00:00
#
output none
#
action 1 cli command “interface GigabitEthernet 0/0”
#
action 2 cli command “no shutdown”
#
action 3 cli command “write memory”
Monitoring the EEM
To monitor the EEM, enter one of the following commands at the ASA CLI or use the CLI tool in ASDM by choosing Tools > Command Line Interface :
Feature History for the EEM
Table 50-1 lists each feature change and the platform release in which it was implemented.