Monitoring ping and RTT

Hello,

I want to monitor the RTT value of a ping request.

I’ve created a new probe :

Available : ping() > 0
Error : if(array_element(ping();1)<200;“”;“RTT > 200ms”)
Value : ping()
Unit : ms
Rate : none.

The help for the ping function is :
sends icmp echo request, returns array of four elements - rtt, packet size, ttl and error description. rtt, packet size and ttl is -1 if error occurs. Only first parameter mandatory. First paramerter - ip address, second - packet size - default 28, third - ttl - default 255, forth - if true accept replys from any ip address - default false

So I have two questions :
1- is my syntax correct ?
2- if not, could you help me ? :unamused:

Thanks for advance,
Best regards.

  1. function parameters are separated with commas;
  2. first array element is with index 0;
  3. ping() function requires at least one parameter - ip address

So you should use some thing like

Available: ping(device_property(“FirstAddress”)) >= 0

Error: if(array_element(ping(device_property(“FirstAddress”)), 0) <
200, “”, “RTT > 200ms”)

Value: ping(device_property(“FirstAddress”))

Now it works great !

Thanks a lot.

Hey arnchri,

Please put your final, working probe in this thread: http://forum.mikrotik.com//viewtopic.php?t=12402

A nice please for people to look for ‘could be usefull’ probe’s. As you now know, it can be a hassle to find out how to do certain things. Let’s learn from each other :bulb: