cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
933
Views
6
Helpful
2
Replies

Embeded Event Manager doesn't execute the cli commands

zsmr00001
Level 1
Level 1

Hello,

I have configured the EEM and IP SLA on router 2911 with the event  "track state down".

event manager applet Prueba3
 event track 1 state down
 action 1.0 cli command "enable"
 action 1.1 cli command "configure terminal"
 action 1.2 cli command "interface gigaEthernet 0/1.120"
 action 1.3 cli command "description XXXXX"   /* this is only to tested the action, the real will be "no ip route-map...." */
 action 1.4 cli command "end"

 

It recognizes the event "track 1 state down", because when I do " show event manager history event", after track is down, it appears :

No.  Job Id Proc Status   Time of Event            Event Type         Name
1    1      Actv success  Wed May28 21:18:04 2014  track              applet: Prueba3

 

But the problem is the the applet doesn't executed the cli commands. The loggin shows:

May 28 21:24:32.113: %TRACKING-5-STATE: 1 ip sla 1 reachability Down->Up
May 28 21:25:29.113: %TRACKING-5-STATE: 1 ip sla 1 reachability Up->Down
May 28 21:25:29.169: %SYS-5-CONFIG_I: Configured from console by  on vty1 (EEM:Prueba3)

When I do "show line vty 1" it seems to be that it have never ingressed.

 

My router has a user and password as:

username rsnpower2 privilege 15 secret 4 LgaZhZWEWKivYt.uo6bM87s3eMiIPtS50PDGv2K1IUA

and it ingresses directly to privileged mode ( #).

I think that if the firts cli commnad is "enable", how it could ingress if it doesn't know the password, or it doesn't need it.

I have also tried without "enable", with "shutdown" and " no shutdown", with "exit", but it doesn't work .

 

The router version is:

Cisco IOS Software, C2900 Software (C2900-UNIVERSALK9-M), Version 15.1(4)M4, RELEASE SOFTWARE (fc1)

 

How could I find out what is happening?

 

I would be very grateful for your help.

Best regards,

Sandro

2 Replies 2

Hello

 

I first glance it looks like your config is okay.- however is the specified interlace correct?

Try this:

track 1 interface gigaEthernet 0/1 line-protocol

event manager applet Prueba3-DOWN
 event track 1 state down
 action 5.0 cli command "enable"
 action 5.1 cli command "conf t"
 action 5.2 cli command "interface gigaEthernet 0/1.120"
 action 5.3 cli command "no description"
 action 5.4 cli command "end"

event manager applet Prueba3-UP
 event track 1 state up
 action 5.5 cli command "enable"
 action 5.6 cli command "conf t"
 action 5.7 cli command "interface gigaEthernet 0/1.120"
 action 5.8 cli command "description TEST"
 action 5.9 cli command "end"

 

To test try shutting down and re enabling the interface

res

Paul

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Fdiazt
Level 1
Level 1

Hello, it's been a while since your question, but it's sure that it will help someone else.

Event Manager does not perform the desired action because you are not declaring the interface type correctly.
The interface is GigabitEthernet, not GigaEthernet.
When the event manager is executed, it does not show error messages if a command was entered incorrectly, since you are declaring text strings that the IOS interprets as commands.
Text strings (or commands) must be entered completely or, failing that, they can be shortened but correctly.

Example:

action 1.2 cli command "interface GigabitEthernet 0/1.120"

action 1.2 cli command "interface gigabitethernet 0/1.120"

action 1.2 cli command "interface Gigabit 0/1.120"

action 1.2 cli command "interface Giga 0/1.120"

action 1.2 cli command "interface G 0/1.120"

action 1.2 cli command "interface g 0/1.120"

Consider that it does not normally discriminate between upper and lower case. Although it all depends on the commands available in the IOS.

Greetings.

Review Cisco Networking for a $25 gift card