How use script s with Netwatch ?

Hello ,

I want to know how to use the scripts with Netwatch ?

I mean should I write the script ? there are no free scripts ?

I mean I want to have a script to send me a message where any GRE Tunnel is down for 1 second ?


I really need your help



Best Regards

Using netwatch to run scripts is complicated because there are some security related restrictions - you have to mark the scripts you want netwatch to run with dont-require-permissions=yes, which may be a security hole. So better to use netwatch to provide information that other (scheduled) scripts use, or do everything using scheduled scripts.


What do you mean by “free scripts”? Scripts already made by someone else to deal with Life, the Universe, and Everything? There is no centralized repository like Google Play or Apple Store, but users of this forum have contributed a lot of scripts, and many of them are able to provide a script.


What kind of message? You can send e-mails, Telegram messages, SMSes (if you have an SMS-capable LTE device connected), SNMP traps… but if a 1 second outage bothers you, the overall dynamic of the process may not satisfy you. If a 1 second outage is an issue to you, you have to use redundancy and automatic failover.


Even if by “help” you actually mean that someone else does it all, you still have to provide at least more details on what you actually want.

Hello Sindy ,


Sorry for not giving too much details.

I’ve purchased an new Mikrotik router and I want to use it to replace Cisco routers.

We are using Cisco routers mainly for GRE tunnels to provide service to the customers.

So we are new to Mikrotik to use it, and we want the best to receive notifications once of these GRE tunnels is down.

like an email notification, so I saw a video on YouTube but it was an old one to add a simple script to the Netwatch and once the host is down I can receive a notification.

This is what I want a quick response once I have an issue with any of these GRE tunnels.


Best Regards

Well, my vision of the situation is that if the purpose of the message is to make you take a corrective action manually, the requirement to send it within 1 second after the outage occurs is not proportional to the time it will take you to take the corrective action, so a keepalive set to something like 1s,3 would still be fast enough.

But nothing prevents you from scheduling a script to run once a second, send five pings 100 ms apart, and if none of them gets responded, send an e-mail about the outage.

You may are also find plenty of scripts at GitHub. Google “github mikrotik scripts” or check out for example “Rextended Fragments of Snippet