Use it to react on the device — collect show output when an error occurs, bounce a port, send a message — and when an applet does not run.
Embedded Event Manager
Embedded Event Manager runs actions on the device itself when something happens: a log message, an interface change, a track going down, a timer. Small policies are written as applets in the configuration; larger ones as Tcl scripts.
1. show event manager policy registered — is the applet registered?
2. show event manager history events — did the event fire?
3. Not fired → the event pattern does not match the real log message or OID; compare them.
4. Fired, actions failed → debug event manager action cli; missing cli command "enable"?
5. Actions in the wrong order → labels sort as text.
applet configured → registered → event occurs and matches → actions run in label order → CLI actions authorised → output or change produced → recorded in the history
The event the applet should react to happens, but no action is taken and no history entry appears.
Possible stored cause: The event pattern (syslog regex, track, timer) never matches the real event, or the applet is not registered.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
event manager applet <name>Primary Commands
Configuration and operational commands for this Topic.
event manager applet <name>ReferenceCreate an Embedded Event Manager (EEM) applet.
Use when: Use after confirming the EEM — Embedded Event Manager target and before changing state.
Quick note: Cross-platform automation / API / controller. Tool success, HTTP 2xx or changed=true does not prove idempotency, complete realization, service health or safe retry behavior.
Cisco IOS / IOS XE · mixedevent syslog pattern "<pattern>"ReferenceTrigger an EEM applet when a syslog message matches a pattern.
Use when: Use after confirming the EEM — Embedded Event Manager target and before changing state.
Quick note: Cross-platform automation / API / controller. Tool success, HTTP 2xx or changed=true does not prove idempotency, complete realization, service health or safe retry behavior.
Cisco IOS / IOS XE · mixedevent timer watchdog time <seconds>ReferenceTrigger an EEM applet repeatedly after a fixed interval.
Use when: Use after confirming the EEM — Embedded Event Manager target and before changing state.
Quick note: Cross-platform automation / API / controller. Tool success, HTTP 2xx or changed=true does not prove idempotency, complete realization, service health or safe retry behavior.
Cisco IOS / IOS XE · mixedevent timer cron cron-entry "<entry>"ReferenceTrigger an EEM applet on a cron schedule.
Use when: Use after confirming the EEM — Embedded Event Manager target and before changing state.
Quick note: Cross-platform automation / API / controller. Tool success, HTTP 2xx or changed=true does not prove idempotency, complete realization, service health or safe retry behavior.
Cisco IOS / IOS XE · mixedaction 1.0 cli command "enable"ReferenceEEM applet action that runs a CLI command; the first CLI action is usually "enable".
Use when: Use after confirming the EEM — Embedded Event Manager target and before changing state.
Quick note: Cross-platform automation / API / controller. Tool success, HTTP 2xx or changed=true does not prove idempotency, complete realization, service health or safe retry behavior.
Cisco IOS / IOS XE · mixedaction 2.0 cli command "<command>"ReferenceEEM applet action that runs the given CLI command.
Use when: Use after confirming the EEM — Embedded Event Manager target and before changing state.
Quick note: Cross-platform automation / API / controller. Tool success, HTTP 2xx or changed=true does not prove idempotency, complete realization, service health or safe retry behavior.
Cisco IOS / IOS XE · mixedaction 3.0 syslog msg "<message>"ReferenceEEM applet action that writes a syslog message.
Use when: Use after confirming the EEM — Embedded Event Manager target and before changing state.
Quick note: Cross-platform automation / API / controller. Tool success, HTTP 2xx or changed=true does not prove idempotency, complete realization, service health or safe retry behavior.
Cisco IOS / IOS XE · mixedShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
show event manager policy registeredShowList registered EEM policies/applets.
Use when: Use after confirming the EEM — Embedded Event Manager target and before changing state.
Quick note: Cross-platform automation / API / controller. Tool success, HTTP 2xx or changed=true does not prove idempotency, complete realization, service health or safe retry behavior.
IOS/IOS XE · mixedshow event manager history eventsShowDisplay the history of EEM events.
Use when: Use after confirming the EEM — Embedded Event Manager target and before changing state.
Quick note: Cross-platform automation / API / controller. Tool success, HTTP 2xx or changed=true does not prove idempotency, complete realization, service health or safe retry behavior.
Cisco IOS / IOS XE · mixedVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
The event the applet should react to happens, but no action is taken and no history entry appears.
Step 1 Verification & evidence Verify boundary
show event manager policy registered; show event manager history events; trigger safely in a lab.
Step 2 Commands & verification Verify boundary
show event manager policy registered— List registered EEM policies/applets.
Step 3 Common failure modes Narrow the fault
Event pattern never matches, action privilege/context issue, recursion/loop or automation causes unintended change.
Step 4 Troubleshooting workflow Narrow the fault
Focus for this topic: Event pattern never matches, action privilege/context issue, recursion/loop or automation causes unintended change.
Step 5 Common mistakes Narrow the fault
- EEM applets without rate limits that trigger loops.
- Applets running with privilege but never logged.
An applet needs one event and one or more actions, run in label order — sorted as text, so 10.0 runs before 2.0; use labels such as 010, 020, 030. Applets that run CLI commands need action ... cli command "enable" first. Use authorisation-safe actions; test the event before relying on it.
show event manager policy registered— applets and policies, with their event.show event manager history events— events that triggered and when.show running-config | section event manager— the applets.debug event manager action cli— see the CLI actions run; use briefly.event manager run <applet>— run an applet with anoneevent by hand.
ReferenceWhat it is1 section · depth on demand
Concept overview
On-box event detection and automated actions using applets/policies.
Key ideas: EEM watches events such as syslog, timers or tracked state and can execute deterministic actions locally.
ReferenceWhy it matters1 section · depth on demand
Why it matters
EEM watches events such as syslog, timers or tracked state and can execute deterministic actions locally.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Embedded Event Manager on IOS XE
EEM lets a device react to its own events: run commands, collect data or send messages when something happens. Cisco's EEM best-practices document for IOS XE covers the common triggers:
- A syslog pattern (
event syslog pattern). - A timer (
event timer watchdogorcron). - A tracked object (
event track). - Interface counters (
event interface). - An SNMP OID threshold.
event nonefor scripts run manually withevent manager run.
Scripts are limited to 20 seconds by default. Raise the limit with maxrun, and use ratelimit on triggers that can fire in bursts.
Best practices from the document
| Practice | Reason |
|---|---|
Number actions with padded labels (0010, 0020) | Labels sort as strings: 120 runs before 13 |
Start with cli command "enable" and term length 0 | Long output otherwise stalls the script until maxrun kills it |
authorization bypass, or an AAA user with rights | With AAA command authorisation, actions are otherwise rejected |
Append output to flash (| append flash:file) | Collect evidence over several runs |
ratelimit on syslog triggers | Avoid parallel runs exhausting resources |
R1(config)# event manager applet CAPTURE-ON-BGP-DOWN authorization bypass
R1(config-applet)# event syslog pattern "%BGP-5-ADJCHANGE.*Down" ratelimit 300 maxrun 60
R1(config-applet)# action 0010 cli command "enable"
R1(config-applet)# action 0020 cli command "term length 0"
R1(config-applet)# action 0030 cli command "show clock | append flash:bgp-down.txt"
R1(config-applet)# action 0040 cli command "show bgp ipv4 unicast summary | append flash:bgp-down.txt"
R1(config-applet)# action 0050 cli command "show logging | last 50 | append flash:bgp-down.txt"
R1(config-applet)# action 0060 syslog msg "EEM collected BGP evidence in flash:bgp-down.txt"
R1# show event manager policy registered
R1# show event manager history events
R1# more flash:bgp-down.txt
R1(config)# event manager applet MANUAL-TEST
R1(config-applet)# event none
R1# event manager run MANUAL-TEST
Typical uses (document)
| Use | Trigger |
|---|---|
| Collect diagnostics when a tracked IP SLA object goes down | event track N state down |
| Shut a port at a packet-rate threshold | event interface ... parameter transmit_rate_pps |
| Record process data during high CPU | SNMP OID trigger on CPU utilisation |
| Scheduled port shutdowns | event timer cron |
Caution
The document says its example scripts aren't supported by Cisco TAC. Test applets with event none first, and keep actions that change the configuration to a minimum.
Documented example, not captured output.
Quick reference
Embedded Event Manager (EEM) lets a Cisco device react to events on its own. When a condition occurs — a log message, a counter threshold, a timer — an applet runs predefined actions, such as collecting diagnostics at the moment of failure or applying a workaround. EEM is particularly valuable for intermittent problems that disappear before anyone can log in.
Embedded Event Manager (EEM) runs actions on the device when events occur: syslog patterns, interface counters, timers, CLI commands, track objects.
event manager applet LINK-DOWN-CAPTURE
event syslog pattern "%LINK-3-UPDOWN: Interface GigabitEthernet1/0/1, changed state to down"
action 1.0 cli command "enable"
action 2.0 cli command "show interfaces Gi1/0/1 | append flash:link.txt"
action 3.0 syslog msg "EEM captured Gi1/0/1 data"
show event manager policy registered
show event manager history events
EEM runs with privileged rights — protect configuration changes to applets and test them carefully.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Network Assurance → Embedded Event Manager. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%Deep reference
Design & tradeoffs
ENCOR design tradeoffs
EEM is useful for local reaction and diagnostics, but production actions need guardrails and clear rollback.