cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1153
Views
4
Helpful
18
Replies

EEM Script not working when manually triggered

Joy3
Level 1
Level 1

Hallo,

I have the below EEM script configured in C1100 router and I am trying to manually trigger it but it is not working. What could it be that I am doing wrong?

event manager applet IP-CHANGE
event none
action 3.0 cli command "enable"
action 4.0 cli command "conf t"
action 5.0 cli command "interface GigabitEthernet0/0/0"
action 6.0 cli command "ip address 162.92.209.14 255.255.255.252"
action 7.0 cli command "no ip route vrf INTERNET 0.0.0.0 0.0.0.0 dhcp"
action 8.0 cli command "ip route vrf INTERNET 0.0.0.0 0.0.0.0 162.92.209.13"
action 9.0 cli command "exit"

R1#event manager run IP-CHANGE

R1#
1 Accepted Solution

Accepted Solutions

event manager applet IP-CHANGE-Joy authorization bypass

add this to new EEM and check debug and run. 

Joy this is solution I hope 

Thanks A Lot
MHM
 

View solution in original post

18 Replies 18

Hello,

the script looks good. What is the output of:

debug event manager action cli

when you run the script manually ?

Event manager applet IP-CHANGE
event none
action 3.0 cli command "enable"
action 4.0 cli command "conf t"
action 5.0 cli command "interface GigabitEthernet0/0/0"
action 6.0 cli command "ip address 162.92.209.14 255.255.255.252"
action 6.1 cli command "exit"
action 6.2 cli command "conf t"
action 7.0 cli command "no ip route vrf INTERNET 0.0.0.0 0.0.0.0 dhcp"
action 8.0 cli command "ip route vrf INTERNET 0.0.0.0 0.0.0.0 162.92.209.13"
action 9.0 cli command "exit"

R1#event manager run IP-CHANGE

Joy3
Level 1
Level 1

@Georg Pauwen I get no output on manually triggerring the script, not even with 'debug event manager all'.

@MHM Cisco World Even with the edit, it doesn't work.

dony edit the old one 
add new Event with new name and run it manually 

Thanks A Lot
MHM

@MHM Cisco World That's what I have done, though action 6.1 should be 'end' then 6.2 'conf t' makes sense. It still doesn't get triggered and no debug message is displayed.

show run

I need to see last EEM you apply 

Joy3
Level 1
Level 1
R1#sh run | sec event manager
event manager applet IP-CHANGE
event none
action 3.0 cli command "enable"
action 4.0 cli command "conf t"
action 5.0 cli command "interface GigabitEthernet0/0/0"
action 6.0 cli command "ip address 162.92.209.14 255.255.255.252"
action 6.1 cli command "exit"
action 7.0 cli command "no ip route vrf INTERNET 0.0.0.0 0.0.0.0 dhcp"
action 8.0 cli command "ip route vrf INTERNET 0.0.0.0 0.0.0.0 162.92.209.13"
action 9.0 cli command "exit"

event manager applet IP-CHANGE-Joy
event none
action 3.0 cli command "enable"
action 4.0 cli command "conf t"
action 5.0 cli command "interface GigabitEthernet0/0/0"
action 6.0 cli command "ip address 162.92.209.14 255.255.255.252"
action 6.1 cli command "exit"
action 6.2 cli command "conf t"
action 7.0 cli command "no ip route vrf INTERNET 0.0.0.0 0.0.0.0 dhcp"
action 8.0 cli command "ip route vrf INTERNET 0.0.0.0 0.0.0.0 162.92.209.13"
action 9.0 cli command "exit"




R1#event manager run IP-CHANGE-Joy

the EEM is not like edit it, it better add new one

Thanks A Lot
MHM

@MHM Cisco World I had turned off the term monitor. Here is partly the output from debug event manager action cli

I already send you solution check below 

Command authorization failed.  - you having issue with Authorisation as mentioned my post earlier.

1. how is your authentication (Local or TACACS ?)  - make changes accordingly

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Joy3
Level 1
Level 1

Still not working @MHM Cisco World even with the new EEM. This is quite strange since there are even no debug messages.

event manager applet IP-CHANGE-Joy authorization bypass

add this to new EEM and check debug and run. 

Joy this is solution I hope 

Thanks A Lot
MHM
 

This was actually what I needed. I suppose it is because authorization is via TACACS which blocks the commands from being executed. Is that right? Thanks so much for your help

 

 

 

 

Review Cisco Networking for a $25 gift card