cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1099
Views
0
Helpful
1
Replies

tracking a state without any trigger

cihanogeturk
Level 1
Level 1

Hello,

I m looking for a EEM configuration for checking the current state of track reachability and reload if it is down. My aim is checking the router accessibility after a reload, and if there is no access reload again.

Track:

Track 1
IP SLA 1 reachability
Reachability is Down
1 change, last change 00:05:42
Delay down 180 secs
Latest operation return code: Timeout
Tracked by:
EEM applet PING

Track 2
IP SLA 1 reachability
Reachability is Down
1 change, last change 00:05:42
Latest operation return code: Timeout

EEM:

event manager applet PING
event track 1 state down
action 1 reload
event manager applet After_Reboot
event tag e1 timer countdown name COUNT time 10
trigger delay 10
correlate event e1
action 010 cli command "enable"
action 020 cli command "show track 2 | inc Reachability"
action 030 regexp "Reachability is Down" "$_cli_result"
action 040 if _regexp_result eq "1"
action 050 cli command "reload"
action 060 end

SLA:

ip sla 1
icmp-echo 172.20.128.1
frequency 5
ip sla schedule 1 life forever start-time now

I have tried another EEM as well, no success.

event manager applet After_Reboot
event tag a1 timer countdown time 10
event tag a2 track 1 state down
trigger
correlate event a1 or event a2
action 0 track read 1
action 1 if $_track_state eq "Down"
action 2 reload

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

In your first After_Reboot applet, just change action 050 to:

action 050 reload

That should do what you want.  The second After_Reboot applet will not do what you want.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: