MikroTik Netwatch generator
Watch your ISP gateway and other hosts from the router itself: list the hosts, pick an interval and a notification method, and get a ready-to-paste Netwatch script with up and down alerts.
Runs in your browser; nothing you type leaves your device
Generates RouterOS /tool netwatch entries that ping IPv4 hosts (type=icmp on v7, the older host= form on v6) and run a script on each state change. It cannot be tested against your router here, so review every line first. The bot token and any e-mail settings live on the router in plain text. Netwatch runs on the router and cannot report the router itself going offline. MikroTik and RouterOS are trademarks of SIA Mikrotīkls. This tool is independent and not affiliated with or endorsed by MikroTik.
How to set up Netwatch alerts on MikroTik
- List the hosts to watch with a label for each: your ISP gateway first, then reliable public addresses such as 8.8.8.8 and 1.1.1.1.
- Choose the interval and timeout, your RouterOS version (v7 or v6) and how you want to be told: an ntfy topic, a Telegram bot, or e-mail.
- Copy the script or download the .rsc file and paste it into the router's terminal, then check /tool netwatch print and /log print.
Netwatch on RouterOS
Netwatch, under /tool netwatch, probes a host at a fixed interval and keeps its state as up or down. A host counts as down when it does not answer within the timeout. On each change RouterOS runs the entry's down-script or up-script, which is where the alert is sent: /tool fetch posts to an ntfy topic or calls the Telegram sendMessage URL, and /tool e-mail send uses the mail settings already configured on the router.
Watch more than one host. A single public address can fail for reasons that have nothing to do with your link, so pairing your ISP gateway with two independent public addresses tells you whether the problem is the last mile or the wider internet. Keep the timeout shorter than the interval, and avoid very short intervals on many hosts.
What Netwatch cannot tell you
Netwatch runs on the router, so it cannot report the router itself going offline: a power cut, a crash or a dead uplink leaves nothing to run the script. For that you need a check from outside that notices when the router stops answering. Read how to get an alert when a MikroTik router goes offline, and use the free outside heartbeat. When you also manage the traffic on the same links, compare the load balancing generator, whose failover uses its own check hosts.
Questions
What does Netwatch do?
Netwatch pings each host at the interval you set. When a host stops answering within the timeout it is marked down and its down-script runs once; when it answers again, the up-script runs. The generated scripts write a log line and, if you chose a method, send a message with /tool fetch or /tool e-mail.
Why can't Netwatch tell me the router itself is offline?
Netwatch is part of the router. If the router loses power, crashes or loses its uplink, nothing is left to run the script or send the message. For that you need a check from outside that notices when the router stops answering. See the guide to router-offline alerts and the free outside heartbeat.
Will I get a DOWN message when my internet link fails?
Often not at that moment. The message is sent over the same router, so if the watched host is the gateway of your only uplink, the down-script runs but the message cannot leave until the link is back. The UP message then tells you it recovered. Watching a second link, or a host on your LAN, gives you alerts that do not depend on the failed link.
What is the difference between v7 and v6 output?
On RouterOS v7 the entries carry type=icmp, which selects the ping probe. RouterOS v6 has no type parameter, so the entries use only host, interval and timeout. If your v7 release is old and rejects type=icmp, delete it from each line.
How are quotes, backslashes and dollar signs in labels handled?
Labels and the router name are escaped for RouterOS strings: backslash, double quote, dollar sign and question mark each get a backslash. The scripts are stored inside the Netwatch entry as strings, so the escaping is applied twice, once for the message and once for the stored script.
Is my configuration or bot token sent anywhere?
No. Everything is generated in your browser. Once you paste the script, the router itself contacts ntfy or Telegram when a host changes state.