11-22-2023 09:47 AM - edited 11-22-2023 09:48 AM
This EEM script appears quite a lot online:
event manager applet catchall
event cli pattern ".*" sync no skip no
action 1 syslog msg "$_cli_msg"
I've added it to three separate IOS/IOS-XE devices and it only works on one of them.
I have a C3560X running 15.2(4)E10, a C3560CX running 15.2(7)E9, a C3650 running 16.12.10a and a C891F router running 15.6(1)T3.
It only works on the C891F. On all the other devices, when I add the configuration the final line appears as this in the configuration:
event manager applet catchall
event cli pattern ".*" sync no skip no
action 1 syslog msg ""
All the Catalyst switches are running the very latest images and they are all different, so I'm not convinced this is a bug. The output to 'show event manager version' shows 'Embedded Event Manager Version 4.00' on all of them.
Any ideas?
Solved! Go to Solution.
11-22-2023 01:56 PM
Yeah, already tried all of them. Using single quotes seems to have fixed it though. If I enter this
event manager applet catchall
event cli pattern ".*" sync no skip no
action 1 syslog msg '$_cli_msg'
The resulting configuration looks like this:
event manager applet catchall
event cli pattern ".*" sync no skip no
action 1 syslog msg "'$_cli_msg'"
Which provides the CLI commands entered as per the original.
11-22-2023 10:01 AM
action 1.0 syslog priority informational msg "$_cli_msg"
Try this add priority with level info to command and check.
11-22-2023 10:36 AM - edited 11-22-2023 10:37 AM
Already tried that and I get this in the configuration with the same omission:
event manager applet catchall
event cli pattern ".*" sync no skip no
action 1 syslog priority informational msg ""
Same on all three devices. I was hoping it would work on the C3650 & C3560CX at least as these are not EoL yet and the software was only recently released for both. The C3560X is EoL and the IOS was released over 3-years ago.
11-22-2023 10:52 AM
It one of three
1- "$_cli_msg"
2- $_cli_msg
3- $_syslog_msg
Try and hope one work with you
11-22-2023 01:56 PM
Yeah, already tried all of them. Using single quotes seems to have fixed it though. If I enter this
event manager applet catchall
event cli pattern ".*" sync no skip no
action 1 syslog msg '$_cli_msg'
The resulting configuration looks like this:
event manager applet catchall
event cli pattern ".*" sync no skip no
action 1 syslog msg "'$_cli_msg'"
Which provides the CLI commands entered as per the original.
11-22-2023 01:58 PM
Happy ends
Have a nice day
MHM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide