2 ISP ping monitor and output to log via /tool ping

Hi,

I have an RB4011 with 2 ISP. They are configured for failover. However, I’m curious if there’s a way to do ping samples by the count of 5 from my 2 ISP interface to either 8.8.8.8 or 1.1.1.1. My goal here is to check whether the failover ISP is still connected to the internet. There are times where I do not experience and outages and I am unable to check my failover ISP if its still connected. Thank you in advance!

I have tried the ff script below: However I would need the one where I can utilize

/tool ping 1.1.1.1 interface=ether1 count=5

then output the avg-rtt.

CTTO: http://forum.mikrotik.com/t/avg-rtt-from-ping-command/75110/1

:local avgRttA 0
:local avgRttB 0
:local numPing 4
:local toPingIP1 8.8.8.8
:local toPingIP2 8.8.4.4
:for tmpA from=1 to=$numPing step=1 do={
/tool flood-ping count=1 size=38 address=$toPingIP1 do={
:set avgRttA ($“avg-rtt” + $avgRttA)
}
/tool flood-ping count=1 size=38 address=$toPingIP2 do={
:set avgRttB ($“avg-rtt” + $avgRttB)
}
/delay 1s
}
:log info (“Ping Average for 8.8.8.8: $($avgRttA / $numPing)ms”)
:log info (“Ping Average for 8.8.4.4: $($avgRttB / $numPing)ms”)