For example:
I define IP address and Mikrotik ping it.
Usually latency is 1 ms, but sometimes is 10 and more
So i need to have log file like this:
Thanks for help and sorry for bad english.Jan 17 05:00:00 ping to 192.168.1.1 is 11ms
Jan 17 05:00:01 ping to 192.168.1.1 is 31ms
Jan 17 05:00:02 ping to 192.168.1.1 is 21ms
Jan 18 06:42:02 ping to 192.168.1.1 is 51ms
Jan 18 09:48:01 ping to 192.168.1.1 is 13ms
Jan 18 15:22:03 ping to 192.168.1.1 is 24ms
I tried this script:
and run it every 1 second.:local avgping
/tool flood-ping x.x.x.x count=1 size=56 do={
:set avgping ($"avg-rtt");
}
:if ($avgping > 10) do={
log info "Ping to gateway x.x.x.x is $avgping ms"
}
Is that correct? Because I got different result with "flood-ping" and "ping" from terminal.
I just need to write all ping thats >10ms by command /ping x.x.x.x