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… you cannot enter the action x.y reload configuration command any more (or any other command that includes the string reload).
event cli pattern "reload" sync no skip yes
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 :)

Hi, I would like to know if EEM policy applet or TCL script able to use the following
ReplyDeleteaction cli command "telnet xxx.xxx.xxx.xxx"
remote terminal and send action cli command to that remote terminal ?
Thx
In theory, it could be doable, but I need to test it in the lab to be sure.
ReplyDeleteSo hows the test in the lab ? Is it doable ? Because i have tried and it failed.
ReplyDeleteSo far, a failure ...
ReplyDeleteEEM 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.
ReplyDeletehi ivan,
ReplyDeletei 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