Pcornel
Networking · Network Assurance

Embedded Event Manager

Cheat sheet · https://pcornel.dk/topic.php?topic=77

Back to the Topic

Answer

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.

Remember

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.

First checks

  • 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 a none event by hand.

Commands

show event manager policy registered
List registered EEM policies/applets.
event manager applet <name>
Create an Embedded Event Manager (EEM) applet.
event syslog pattern "<pattern>"
Trigger an EEM applet when a syslog message matches a pattern.
event timer watchdog time <seconds>
Trigger an EEM applet repeatedly after a fixed interval.
event timer cron cron-entry "<entry>"
Trigger an EEM applet on a cron schedule.
action 1.0 cli command "enable"
EEM applet action that runs a CLI command; the first CLI action is usually "enable".
action 2.0 cli command "<command>"
EEM applet action that runs the given CLI command.
action 3.0 syslog msg "<message>"
EEM applet action that writes a syslog message.
show event manager history events
Display the history of EEM events.

Verify in this order

applet configured → registered → event occurs and matches → actions run in label order → CLI actions authorised → output or change produced → recorded in the history

Where it usually breaks

physical/link dependency → local object state → peer/control state → policy → forwarding/adjacency → end-to-end result

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=77

Confirmation

Confirm action

Continue?