- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2024 06:13 PM - edited 04-18-2024 06:15 PM
I'm trying to have EEM script where I run the script manually and it display the output of the results in the session but for some reason I'm unable to do so. This is what I have so far
(config)#event manager applet TestCommand
(config-applet)# event none
(config-applet)# action 1.0 cli command "show version"
(config-applet)# action 2.0 puts "$_cli_result"
(config-applet)#end
When I do "event manager run TestCommand" it shows a blank output with no results.
Solved! Go to Solution.
- Labels:
-
Network Management
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2024 07:36 AM
i found my solution for this, i had to put single quotations around $_cli_result to get this to work
event manager applet TestCommand
event none
action 1.0 cli command "enable"
action 2.0 cli command "show version"
action 3.0 puts '$_cli_result'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2024 10:53 PM
Hello,
it looks like you need to add the 'enable' command:
(config)#event manager applet TestCommand
(config-applet)# event none
(config-applet)# action 1.0 cli command "enable"
(config-applet)# action 2.0 cli command "show version"
(config-applet)# action 3.0 puts "$_cli_result"
(config-applet)#end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2024 05:44 AM
this was my result when i ran it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2024 11:49 PM
debug event manager all
Share output of this
MHM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2024 06:17 AM
When I did this and ran the event manager run TestCommand, I didn't see any output for the debug
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2024 06:19 AM
Hello,
post the running configuration (sh run) of the device you have installed the EEM script on...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2024 05:38 PM - edited 04-22-2024 07:36 AM
correct command is below
MHM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 07:05 AM
this was my result
here is what i have in my show run
I'm not sure why the $_cli_result command doesnt show
this is what I entered
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 07:14 AM - edited 04-22-2024 07:14 AM
Friend the correct command in yellow'
You need to config
Puts $_cli_result
Without any " inbetween
Check yellow command I share
MHM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 07:21 AM
sorry, are you asking to have it be like:
event manager applet TestCommand
event none
action 1.0 cli command "enable"
action 2.0 cli command "show version"
action 3.0 puts $_cli_result
the action 3.0 line would get me a incomplete command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 07:37 AM
it work in my lab
do space between word puts and $_cli_result
MHM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 07:45 AM
yep, I have a space in between puts and the $_cli_result, I'm not sure why its being considered a incomplete command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 07:52 AM
Ok'
Use new event manager with new name
And use "" for puts command
And check result when you run it manually
MHM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 07:56 AM
this is what I've entered
And this was my result (same as previous)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 07:16 AM
Hello,
odd indeed. I would delete all EEM scripts, reboot the router, and enter the script again...
