Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

Manually Run EEM Scripting Problems

Greetings,

 I'm trying to configure an EEM script with an 'event of none', so that I can manually run the EEM script. I basically have the following script configured on a router.

event manager applet TSHOOT

 event none

 action 1.0 cli command "sh run | I LINK"

 action 2.0 cli command "sh run | I LINE"

 action 3.0 cli command "sh log | I Controller"

 action 4.0 cli command "sh int x/x/x:0 | sec rate"

 action 5.0 cli command "sh controller t1 x/x/x | I [1-9]"

I can go to Privileged Exec mode and type "event manager run TSHOOT", it accepts the command but nothing happens. I put the "event none", since it's not really waiting on a trigger, and so I can manually run it. Am I doing something wrong? I don't see any output at all from these commands after I run "event manager run TSHOOT".

2 REPLIES
Bronze

EEM doesn't automatically run

EEM doesn't automatically run as a privileged user.  Try adding:

action 0.5 cli command "enable"

Best to see exactly what it's doing though by running a debug (make sure you're logging buffer is set to debug level):

debug event manager action cli

Cisco Employee

Yes, enable is definitely

Yes, enable is definitely needed, but EEM will also not print the results of the commands by default.  You need to add something like the following between each cli action:

action 1.5 puts $_cli_result

101
Views
0
Helpful
2
Replies