09-25-2017 08:12 AM - edited 03-01-2019 06:09 PM
Hi,
I have a problem with the 2 SLA that I am using to get EEM script and Failover.
I have 4 tracks that I am ussing 2 for 1 SLA. My conifg is the next:
! track 1 ip sla 1 reachability delay down 6 up 6 ! track 2 list boolean and object 1 not ! track 3 ip sla 3 reachability delay down 6 up 6 ! track 4 list boolean and object 3 not ip route 192.168.255.255 255.255.255.255 Cellular0 track 1 ip route 0.0.0.0 0.0.0.0 FastEthernet4 x.x.x.x track 3 ip route 192.168.255.254 255.255.255.255 FastEthernet4 x.x.x.x track 3 ip route 0.0.0.0 0.0.0.0 Cellular0 10 ip route 192.168.255.254 255.255.255.255 Cellular0 10 ip route 192.168.255.255 255.255.255.255 FastEthernet4 x.x.x.x 10 ip sla 1 icmp-echo 8.8.8.8 source-interface Cellular0 threshold 2 timeout 1500 frequency 2 ip sla schedule 1 life forever start-time now ip sla 3 icmp-echo 8.8.8.8 source-interface FastEthernet4 threshold 5 timeout 1500 frequency 2 ip sla schedule 3 life forever start-time now scheduler allocate 20000 1000 event manager environment q ? event manager environment cr ^V event manager applet TRACK1 event track 1 state up action 1.0 cli command "enable" action 2.0 cli command "clear ip nat trans force" action 2.1 cli command "configure t" event manager applet TRACK2 event track 2 state up action 1.0 cli command "enable" action 2.0 cli command "clear ip nat trans force" action 3.0 cli command "configure t" event manager applet TRACK3 event track 3 state up action 1.0 cli command "enable" action 2.0 cli command "clear ip nat trans force" action 3.0 cli command "configure t" event manager applet TRACK4 event track 4 state up action 1.0 cli command "enable" action 2.0 cli command "clear ip nat trans force" action 3.0 cli command "configure t" end
When I see tha track states are the below
Track 1 IP SLA 1 reachability Reachability is Up 2 changes, last change 00:06:16 Delay up 6 secs, down 6 secs Latest operation return code: Over threshold Latest RTT (millisecs) 96 Tracked by: Static IP Routing 0 Track List 2 EEM applet TRACK1 Router#show track 2 Track 2 List boolean and Boolean AND is Down 3 changes, last change 00:06:20 object 1 not Up Tracked by: EEM applet TRACK2 Router#show track 3 Track 3 IP SLA 3 reachability Reachability is Down 1 change, last change 00:09:16 Delay up 6 secs, down 6 secs Latest operation return code: Timeout Tracked by: Static IP Routing 0 Track List 4 EEM applet TRACK3 Router#show track 4 Track 4 List boolean and Boolean AND is Up 2 changes, last change 00:09:17 object 3 not Down Tracked by: EEM applet TRACK4
However I am seeing that the EEM is not working when one Track change the estate.
Could you know what is happenning?
Regards.
Solved! Go to Solution.
12-12-2017 07:16 AM
No, I'm not exactly sure what you're trying to achieve. All EEM policies that use the tack event detector will only execute when the tracked object changes state. If that's not happening, you could configure your track to be default down (or default up depending on what the current initial state is).
09-26-2017 07:17 AM
I'm not following. Which EEM applet is not working? Why do you have a needless "config t" in each applet? You can always enable "debug event manager action cli" to see what's happening when then CLI commands execute.
10-02-2017 11:37 PM
Hi,
the applet is something like
action 1.0 cli command "enable" action 2.0 cli command "clear ip nat trans force" action 3.0 cli command "configure t" action 4.1 cli command "no ip nat inside source static tcp 192.168.0.171 2080 interface Cellular0 2080"
in each track but diferent port.
The problem is that I can't check the debug if I don´t reload it.
Do you think any kind of instruction that I can log this debug to check it If I reload the device?
Regards.
10-03-2017 05:55 AM
I recall some of the NAT config commands are also interactive. If you run this same set of commands manually, do you get any prompts from the device?
If you have AAA command authorization configured, you will also need to either configure your applets with authorization bypass or config "event manager session cli username USER" where USER is a user authorized to run all of the CLI commands.
10-03-2017 08:07 AM
Yes, the commands are interactve however if there is any error I could see it. My question is that I right this config? Could I can check if it is working when I reload the device?
Maybe I can introude one sentence and check in running system if it is in the code.
Regards.
10-03-2017 12:41 PM
I don't know if this is the right config or not. It's what you need it to do. What I can say is that if commands are interactive, then you need to account for that in your CLI action. What is the exact output of the commands when you run them manually? From there, proper responses can be coded into the applet so that it will effectively execute the commands.
10-11-2017 02:03 AM
Hi,
the problems is that the output of the applet is empty and this applet is starting only when the router is rebooted.
I need to check the log by internet, so when the router is rebooted, I can't read the console, this is my problem, I can´t check the console so I need to read in one log all details.
Regards.
10-11-2017 07:13 AM
I'm not sure what more I can tell you, then. I don't know if the NAT config command is interactive nor what the prompt is if it is interactive. I would tell you to run "debug event manager action cli" to look at what the applet is doing from the CLI standpoint, but it doesn't sound like you would be able to do that.
10-18-2017 07:22 AM
Hi
I have tryed this config
event manager applet TRACK1 event track 1 state up action 1.0 cli command "enable" action 2.0 cli command "clear ip nat trans force" action 2.1 cli command "configure t" action 4.0 cli command "ip nat inside source static tcp 192.168.10.10 50000 interface Cellular0 50000" event manager applet TRACK2 event track 2 state up action 1.0 cli command "enable" action 2.0 cli command "clear ip nat trans force" action 3.0 cli command "configure t" action 4.0 cli command "ip nat inside source static tcp 192.168.10.10 50000 interface Cellular0 50000" event manager applet TRACK3 event track 3 state up action 1.0 cli command "enable" action 2.0 cli command "clear ip nat trans force" action 3.0 cli command "configure t" action 4.0 cli command "ip nat inside source static tcp 192.168.10.10 50000 interface Cellular0 50000" event manager applet TRACK4 event track 4 state up action 1.0 cli command "enable" action 2.0 cli command "clear ip nat trans force" action 3.0 cli command "configure t" action 4.0 cli command "ip nat inside source static tcp 192.168.10.10 50000 interface Cellular0 50000" end
However, when I have checked the nat list, is empty.
I think that track is not working.
Could anybody help me? The problem is that I can't check the CLI becouse I am rebooting by remote.
Regards.
10-22-2017 11:38 PM
Could anybody help me please?
Regards.
11-14-2017 02:09 AM - edited 11-14-2017 02:17 AM
Hi, I don´t know why the even track is not working.
CabrelaRouter#sh ip sla summary IPSLAs Latest Operation Summary Codes: * active, ^ inactive, ~ pending ID Type Destination Stats Return Last (ms) Code Run ----------------------------------------------------------------------- *1 icmp-echo 8.8.8.8 - Timeout 2 minutes, 20 seconds ago *3 icmp-echo 8.8.8.8 RTT=724 OK 5 seconds ago
Ip sla is working fine, because I am doing ping to do a failover.
My track 2 is up
Track 2 List boolean and Boolean AND is Up 4 changes, last change 00:08:07 object 1 not Down Tracked by: EEM applet TRACK2
and this is my applet
event manager applet TRACK2 event track 2 state up action 1.0 cli command "enable" action 2.0 cli command "clear ip nat trans force" action 3.0 cli command "configure t" action 3.02 cli command "no ip nat inside source static tcp 192.168.0.173 6080 interface Cellular0 6080"
However the nat rule is active.
Could you help me please?
Regards.
11-14-2017 05:24 PM
As I said before, I think the "no" command is interactive and thus prompting for confirmation. I would like to either see the output of running the commands in the applet manually or the output of "debug event manager action cli" to understand what is happening with the applet.
Note: the applet will not run until the track transitions state from down to up.
12-11-2017 02:27 AM
12-12-2017 07:16 AM
No, I'm not exactly sure what you're trying to achieve. All EEM policies that use the tack event detector will only execute when the tracked object changes state. If that's not happening, you could configure your track to be default down (or default up depending on what the current initial state is).
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: