• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

Roger Perkin

Network Automation Architect

  • Network Automation
    • Network Automation Courses
    • What is NetDevOps?
    • Workflow Orchestration
    • Ansible Automation Platform
    • Ansible Workshop
    • What is Network Automation?
    • Network Automation Tools
    • ContainerLab
    • Ansible Training
      • What is Ansible?
      • Ansible Tutorial for Beginners
      • Ansible Network Automation
      • Ansible Inventory Example
    • Python Network Automation
      • Nornir
      • Python Network Automation Course
      • Python for Network Engineers
      • Python VENV / Virtual Environment Tutorial
      • Python Tutorial for Beginners
      • pyATS
    • Network Source of Truth
      • NetBox
      • Infrahub
    • NetDevops
    • DevOps Tutorial
      • Git Training
      • Terraform Training
      • Linux Training
      • Kubernetes Training
      • Devops Training Course
      • Azure Devops Training
    • Terraform
    • GIT
      • Git Commands
      • What is GitHub?
    • Docker Training
    • Confluence
    • Microsoft Azure
  • Cisco
    • ISE
    • SD WAN Training
    • Password Recovery
    • Software-Upgrade-Guides
    • BGP
    • Data Center
    • WIRELESS
  • CCIE
  • Blog
  • About
    • My Red Special Guitar
  • Contact

Show Event Manager Policy Registered

Home » EEM

Whilst studying EEM I discovered the command  show event manager policy registered it basically shows you the policies you have registered on your device.

When you create a policy it just needs and event and an action and it will self register.

Lets create a simple script that will look for a command being typed onto the CLI and then action on it.

This policy will monitor for anyone typing router ospf, and then if they do, will not action the command and then put up a syslog message saying No OPSF here!

R1(config)#event manager applet OSPF
R1(config-applet)#event cli pattern "router os*" sync no skip yes
R1(config-applet)#action 1.0 syslog msg "OSPF is not allowed"
R1(config-applet)#exit
R1(config)#exit
R1#show event manager policy registered
*Mar  1 00:02:35.903: %SYS-5-CONFIG_I: Configured from console by console
R1#show event manager policy registered
No.  Class   Type    Event Type          Trap  Time Registered           Name
1    applet  user    cli                 Off   Fri Mar 1 00:02:34 2002   OSPF
pattern {router os*} sync no skip yes
maxrun 20.000
action 1.0 syslog msg "OSPF is not allowed"

Let’s break this down line by line

1. First  you have to define an applet – event manager applet OSPF
2. Next  you define an event, in this case we are matching a cli pattern of router os* so basiclaly anything starting router os
The next two command are very important from the cli options
no   Policy and CLI will run asynchronously
yes  Run policy and the result determines whether to run CLI
Basically if you put no the command will not run, if  you put yes the command will run

3. When the cli pattern is matched a syslog message will be generated

To check what EEM scripts  you have registered on your device you enter the command
show event manager policy registered
the output can be seen above

Category: EEMTag: ccie blog, eem
ansible course for network engineers
Get Access to my Ansible Course NOW
Previous Post:Spanning Tree Port States
Next Post:Console Cable for Ipad

Sidebar

Hi I'm Roger Perkin,
Based in the UK working as a Network Automation Architect, CCIE #50038
About Roger | Twitter | Linkedin

python course for network engineers

Topics

Network Automation
Ansible
Python for Network Automation
CCIE
Cisco ISE
F5 Certification
BGP
OSPF
Network Automation Conferences
auvik promo banner
Pluralsight Trial

Git for Network Engineers

Ansible vs Nornir

Start learning today with my Network Automation Courses

Master Ansible, Python, Git, Nornir, Jenkins and more..


Buy me a coffeeBuy me a coffee

ansible network automation course

Have you seen my YouTube Channel?

YouTube Subscribe

Let’s get started

Take a look at my premium courses on Ansible, Nornir & Git or buy them all with the Network Automation Bundle!

Network Automation Courses

Navigation

Python VENV Tutorial
Python for Network Engineers

Network Automation
Network Automation Courses
Network Discovery Tools
Network Automation Conferences
Ansible Training
What is Ansible?
Devops Tutorial
Network Source of Truth
DevOps Glossary
Network Monitoring Software

Contact

Contact

Get in touch with me here

[email protected]

  • Twitter
  • LinkedIn
  • YouTube
Buy me a coffeeBuy me a coffee

Copyright © 2025 · Roger Perkin · All Rights Reserved · Privacy Policy – Terms