cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
879
Views
5
Helpful
7
Replies

EEM applet not registering

russell.sage
Level 1
Level 1

I have two EEM applets - one to shut a port down when an IP SLA measurement fails. That works fine. Then a second script when a tracking object determines the IP SLA measurement has restarted. Object tracking seems to have been removed in EEM 4.0 under 17.6 for Cat9200L so I am having to use a syslog pattern. This will not register and hence never triggers?

event manager applet fast_failover
event ipsla operation-id 1 reaction-type timeout
action 1.0 if $_ipsla_condition eq "Occurred"
action 1.1 cli command "enable"
action 1.2 cli command "conf t"
action 1.3 cli command "interface G1/0/1"
action 1.4 cli command "shut"
action 1.5 syslog msg "EEM Script Activated"
action 1.6 end
event manager applet recover
event syslog pattern "%TRACK-6-STATE: 1 ip sla 1 state Down -> Up"
action 1.0 cli command "enable"
action 1.1 cli command "conf t"
action 1.2 cli command "interface fa1/0/1"
action 1.3 cli command "no shut"
action 1.4 syslog msg "EEM Script recover activated"
action 1.5 end
!
end

sh event manager policy registered
No. Class Type Event Type Trap Time Registered Name
1 applet user ipsla Off Wed Jul 13 08:09:40 2022 fast_failover
operation-id {1} reaction-type {timeout}
maxrun 20.000
action 1.0 if $_ipsla_condition eq "Occurred"
action 1.1 cli command "enable"
action 1.2 cli command "conf t"
action 1.3 cli command "interface G1/0/1"
action 1.4 cli command "shut"
action 1.5 syslog msg "EEM Script Activated"
action 1.6 end

Client Policies
No. Class Type Event Type Trap Time Registered Name
1 CH user timer cron Off Wed Jul 13 08:09:40 2022 CiscoTAC-1

 

1 Accepted Solution

Accepted Solutions

Dan Frey
Cisco Employee
Cisco Employee

Remove "action 1.5 end" in the recover policy.    There is no conditional block to "end" in this policy.   It is needed in the first policy since there is an "if" block.

View solution in original post

7 Replies 7

can I see the config of IP SLA ?

track 1 ip sla 1 state
delay down 5 up 15

ip sla 1
icmp-echo 8.8.8.8 source-interface Vlan20
threshold 50
timeout 1000
frequency 1
ip sla schedule 1 life forever start-time now
ip sla reaction-configuration 1 react timeout threshold-type immediate action-type trapOnly
ip sla logging traps
ip sla enable reaction-alerts

 

I meant to add this is the syslog message I am trying to match

002452: Jul 13 2022 12:13:29.740 UTC: %TRACK-6-STATE: 1 ip sla 1 state Down -> Up

I see the will do test it and see where is issue here, 
but 
the first EEM event for IP SLA timeout, here IP SLA also need to change from UP->DOWN 
which then by second EEM event the IP SLA will change from DOWN ->UP,
from first view it can be the timeout reaction is detect but the IP SLA still UP and hence the status change of second EEM is never hit.
so until  I check the config 
do check if you get reaction timeout, are the track is UP or Down ?

Hi I think the problem is the second EEM doesn't register.

When I issue the show event manager policy registered it only shows the first applet. I then ran the command again adding the applet name recover and the switch crashed and reloaded. I am running 17.6.3 which the latest version of code and the recommended release by Cisco TAC. I am attempting to get a case raise with them to investigate

Dan Frey
Cisco Employee
Cisco Employee

Remove "action 1.5 end" in the recover policy.    There is no conditional block to "end" in this policy.   It is needed in the first policy since there is an "if" block.

Many thanks - been driving mad