cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
725
Views
0
Helpful
9
Replies

EEM script error

we have configured EEM script on the router to shut the BGP neighbour. but its not working.

ip sla 30
icmp-echo 10.1.32.106 source-ip 10.3.165.198
threshold 260
timeout 500
frequency 3
ip sla schedule 30 life forever start-time now
ip sla enable reaction-alerts
!
track 30 ip sla 30 reachability
delay down 5 up 180
!
ip route 10.1.32.106 255.255.255.255 10.3.165.197
!
event manager applet SWDC_REACHABILITY_DOWN
event syslog pattern "30 ip sla 30 reachability Up -> Down"
action 1.0 cli command "enable"
action 1.1 cli command "configure term"
action 1.2 cli command "router bgp 64760"
action 1.3 cli command "neighbor 10.3.165.197 shutdown"
action 1.4 cli command "end"
!
event manager applet SWDC_REACHABILITY_UP
event syslog pattern "30 ip sla 30 reachability Down -> Up"
action 1.0 cli command "enable"
action 1.1 cli command "configure term"
action 1.2 cli command "router bgp 64760"
action 1.3 cli command "no neighbor 10.3.165.197 shutdown"
action 1.4 cli command "end"

 

kindly suggest please to fix..

9 Replies 9

Hello

 

event manager applet SWDC_REACHABILITY_DOWN
event track 30 state down

event manager applet SWDC_REACHABILITY_UP
event track 30 state up

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

can you tell me what mistakes i made in my configuration and which commands needs to be include?

can you explain?

Hello

As far as i can see it looks okay apart from the applet wasn't monitoring the tracking but the ip sla

 

Just try the below changes and test again

 

event manager applet SWDC_REACHABILITY_DOWN
event track 30 state down

event manager applet SWDC_REACHABILITY_UP
event track 30 state up

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

Hello,

 

on a side note, I think this should work as is, you might want to change the delay values and add the reaction threshold:

 

track 30 ip sla 30 reachability
delay down 5 up 5

!

ip sla reaction-configuration 30 react timeout threshold-type immediate

Hello

I guest if you going to use ip sla then tracking isn't required as such you may need to change the applet anyway

 

event manager applet test
 event syslog pattern ".*OPER_TIMEOUT: condition occurred, entry number = 30"

Test and see, it may may not work I have not tested it myself

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

we have tried all options but not luck

Hello

 

Can you ping 10.1.32.106  sourced from 10.3.165.198 ?


sh ip sla  statistics
sh track

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

No luck means the script isn't running at all ? Post the full config of your router...

Issue resolved after enabling no authorization coomand for eem script

 

Thanks for all..

Review Cisco Networking for a $25 gift card