Your browser failed to load CSS style sheets. Your browser or web proxy might not support elliptic-curve TLS

Building network automation solutions

6 week online course

Start now!
back to overview

EEM CLI patterns are not context sensitive

When writing EEM applets or policies that act on CLI commands, keep in mind that the pattern matching is not context sensitive. For example, if you want to disable the reload command and use the EEM applet …
event manager applet NoReload
 event cli pattern "reload" sync no skip yes
… you cannot enter the action x.y reload configuration command any more (or any other command that includes the string reload).

To distinguish the reload command from other appearances of the same string, use the ^reload pattern (reload occuring at the beginning of the line).

Trivia: this actually occured to me when I was testing the setup described in the December IP Corner article. Sometimes we have to learn the hard way :)


  1. Hi, I would like to know if EEM policy applet or TCL script able to use the following

    action cli command "telnet"

    remote terminal and send action cli command to that remote terminal ?


  2. In theory, it could be doable, but I need to test it in the lab to be sure.

  3. So hows the test in the lab ? Is it doable ? Because i have tried and it failed.

  4. EEM 3.0 has an enhanced cli event detector that allows you to specify the mode of the command. Unfortunately the mode values that you can use are not obvious and not documented. However, there is a hidden command to see the modes - 'show parser mode' - the name column lists the various parser modes. Since it's a hidden command, use it at your own risk.

  5. hi ivan,

    i am totally confuse in sync yes|no skip yes|no. what is the mean of sync and skip, when we use these keywords and what is the mean of yes and no. please help me


You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.