How to Monitor MikroTik Network Connections with Netwatch

Netwatch is one of the features of RouterOS which functions to monitor network connections whether it’s up or down. So we will immediately find out the condition of the Mikrotik network when it is down and up again via e-mail or SMS.

How Netwatch Works
The concept is like this, Netwatch will ping certain hosts (IP address or domain) with certain time intervals such as ping every 1 minute. If when the netwatch ping hosts the Reply, it means that the connection is up and if Request timed out (RTO) means down. Each condition of Up and Down can we enter certain scripts as needed. We can also enter the script to send an email or automatic SMS if the network connection condition is up or down.

Well, I already know how Netwatch works. In this article we will learn mikrotik about How to Monitor Microtic Network Connections with Netwatch notification via e-mail. Why email? Why hey ?? Tell us what? : P Previously, it was discussed about e-mail in this article How to set up e-mail and send e-mail on RouterOS microtic. Please read first to understand. Why don’t you just use SMS? Not all Mikrotik supports SMS because only the RouterBoard has a USB port or the SIMCard can only text.
How to set Mikrotik Netwatch
Before starting, make sure you have set up the Mikrotik email configuration.

If we have set the Mikrotik Netwatch:

  • Open Winbox, go to the Tools menu -> Netwatch
  • Click the + button to add netwatch host.
  • Fill in the Host with google.com or its IP address 74.125.135.138. Why Google? We choose Google because Google servers are always alive.

Interval: what is the time interval for each ping (default = 1 minute)
Timeout: how big is the timeout indication (default = 1000ms) if the reply is more than 1000ms, RTO will be calculated.

  • Click Apply -> Ok
  • Enter tab Up. Here we can enter the script to send e-mail automatically when internet is up. Here is an example of the script:

/tool e-mail send to=”[email protected]” from=”[email protected]” body=”Internet Normal. by MikrotikIndo.blogspot.com” tls=yes subjet=”Cennection Monitor Mikrotik = UP”

  • Please edit the script yourself, fill in your e-mail yourself. If already click Apply -> Ok
  • Please try to disconnect the internet connection from your Mikrotik a few moments then connect again.
  • Check the inbox in the destination email that you entered in the script. If the settings are correct, a notification email will appear if the internet connection is down and up again.

Leave a Reply

Your email address will not be published. Required fields are marked *