cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2807
Views
0
Helpful
4
Replies

EEM Applet Scripts not working

liszanefirdous
Level 1
Level 1

Hi Guys,

i have a problem which, the eem applet scripts not working and when i checked from the log there is no any activity on that, but when i checked from the main event policy registered it showing success, but it doesn't appear on the log.

2nd,  the scripts that i run it was success on that particular interface which i command to shut down, however it doesnt appear on the log.

can you please advise?btw my os version :Cisco IOS XE Software, Version 03.16.04a.S 

//

#event syslog pattern "Interface GigabitEthernet2, changed state to administratively down"
#action 1.0 cli command "enable"
#action 1.5 cli command "config t"
#action 2.0 cli command "interface GigabitEthernet"
#action 2.5 cli command "no sh"
#action 3.0 cli command "end"
#exit

# sh ip int brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet2 unassigned YES NVRAM administratively down down

#sh event manager history events
No. Job Id Proc Status Time of Event Event Type Name
2 24 Actv success Fri Feb17 10:25:16 2017 none applet: interface
//

//

it doesnt appear on the log. this is the last log which it triggered where there is no any EEM_ log on this 

//

Feb 17 16:21:11.077 MAL: %SYS-5-CONFIG_I: Configured from console by admin on vty2 (172.17.33.160)

Can someone advise? 

is kinda urgent.

thanks for ur feedback.

1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

You're missing your interface number:

#action 2.0 cli command "interface GigabitEthernet"

This should be:

action 2.0 cli command "interface GigabitEthernet2"

View solution in original post

4 Replies 4

Joe Clarke
Cisco Employee
Cisco Employee

You're missing your interface number:

#action 2.0 cli command "interface GigabitEthernet"

This should be:

action 2.0 cli command "interface GigabitEthernet2"

hi Joe,

Thanks for ur feedback and correction.

yes it works! and EEM script appear on the log for the interface gi2.

but today I was trying another simple scripts and the EEM log also doesn't appear on the log.

the interface able to bringing it  down and up,by the eem script, its just from the log it doesn't show eem script on that., sigh . it was suppose showing this msg "Interface Loopback0 was brought up via EEM", but it doesnt showing any eem script there.

i retry many times, but still no any log on that.

Can you please advise? Appreciate your feedback.

tq

//

event manager applet loop0Test
(config-applet)#event syslog pattern "Interface Loopback0.* down" period 1
(config-applet)#action 2.0 cli command "enable"
(config-applet)#action 2.1 cli command "config t"
(config-applet)#action 2.2 cli command "interface lo0"
(config-applet)#action 2.3 cli command "no shutdown"
(config-applet)#action 3.0 syslog msg "Interface Loopback0 was brought up via EEM"
(config-applet)#exit

//

Then, i shutdown the interface loopback0


#interface loopback0
#shutdown
#exit

//

When I checked from the log, the EEM script from action 3 wasn't there.

//

Feb 19 21:53:38.478 MAL: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to down
Feb 19 21:53:38.478 MAL: %LINK-5-CHANGED: Interface Loopback0, changed state to administratively down>>>>>>>>>>>>>>>>>>>>>>>>>>>this is when i run the eem script
Feb 19 21:53:40.013 MAL: %SYS-5-CONFIG_I: Configured from console by admin on vty1 (172.17.33.161)
Feb 19 21:53:41.891 MAL: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up >>>>>>>>>>>>>>>>>>>>>>>.this is up by itself without i manually put no shut. it appear to be up auto by eem scripts


Feb 19 21:53:41.891 MAL: %LINK-3-UPDOWN: Interface Loopback0, changed state to up
Feb 19 21:53:41.892 MAL: %VXE_VNIC_IF-3-MSGINITERROR: VXE vNIC interface command: multicast_null failed: -1 for Loopback0
Feb 19 21:53:41.892 MAL: %VXE_VNIC_IF-3-MSGINITERROR: VXE vNIC interface command: multicast_null failed: -1 for Loopback0

# sh clo
21:54:16.688 MAL Sun Feb 19 2017

//

From the event manager history, it appear success as below:-

//

10 16 Actv success Sun Feb19 21:53:38 2017 syslog applet: loop0Test

//

I don't understand your statement:

"this is up by itself without i manually put no shut. it appear to be up auto by eem scripts"

Does this mean the interface came up because of EEM, or it came up because you did a manual "no shut"?  The fact the syslog message never printed could be because your logging destination isn't set for debug.

Hi Joe | Team, 

Can someone advise why my script didn't trigger from the log ?

thanks

Review Cisco Networking for a $25 gift card