Hello,
I want to create a script that is make a ping to a host 1.1.1.1 after 10 ping if the replay time is less than 90 then do somting.
so how I can do that ?
thanks.
It is complicated as the ping command does not offer many options in RouterOS.
You could do something like
:if ([:ping 1.1.1.1 count=10 interval=90ms]<8) do={:put something}
This will execute the do= block if less than 8 out of 10 pings arrive in less than 90ms.
You could tune:
- The number of attempts, to filter transient failures
- The fraction of failures required to trigger (in my example (10-8/10), i.e. 20%
- The interval between attempts/time to wait for answer, they seem to be controlled by the same parameter