No ping - write to log after 5 mins.

Hi.
I am trying to make my logs swhow when it appears that one or more of my links are down.
I have them setup to ping targets in /tool netwatch, and write to log if it is down.
Now, this is ok. But i have small interrupts ( i test hosts every 1 minute.) , wich show only one minute downtime. This could be a time out, too large ping time, or interrupt.
But hey ! 1 minute ain’t that long.
What I would want is if I could write to log only if it does not answer to 3 or five consecutive pings, each every minute. I mean, write to log if the link is down for more than 3 minutes.
How could i do that ?
I could do that by putting interval in netwatch to 3 minutes, but that would mean that if I loose that specific packet on a 3 minute interval, my log would show that too.

How can I catch if i miss 3 pings, one at each minute ?
:slight_smile:
thx. in advance.

If i understood correctly:

:if ([/ping xxx.xxx.xxx.xxx count=5] != 0) do={ :log info "no response"; };

Add this code to scheduler to run every minute.

thx. ( only it was “response” - inverse condition. :slight_smile: )
:slight_smile:

Hi, I’m not to familiar with the syntax, if that relates to the inverse condition i.e it writes a log every time 5 x ping was successful, what would it need to be if you only want the log entry to show if it was unsuccessful?