Description

Mikrotik routers include a built-in service called Netwatch, which can monitor the availability of a remote host. You can configure it to send email alerts via the router’s built-in email client when the host goes OFFLINE or comes back ONLINE.


🎥 Video Tutorial


🧰 Step 1: Open Netwatch

  1. Connect via Winbox.
  2. Navigate to Tools > Netwatch. Screenshot 1

➕ Step 2: Add a New Netwatch Host

  1. Click Add ➕ to create a new host entry. Screenshot 2
  2. Fill in the fields:
    • 📍 Host: IP address of the device to monitor
    • ⏱ Interval: How often the host should be checked (e.g., 00:01:00)
    • ⌛ Timeout: Maximum wait time before considering the host down (e.g., 1000 ms) Screenshot 3

📧 Step 3: Script to Send Email When Host is UP (ONLINE)

Paste the following in the Up Script section:

:local host "YourServerName"
:local status "ONLINE"
:local mailTo "simplelbase@gmail.com"
:local mailFrom "simplelbase@gmail.com"
/tool e-mail send from=$mailFrom to=$mailTo subject=($host . " " . $status) body=($host . " " . $status)

Screenshot 4

📧 Step 4: Script to Send Email When Host is DOWN (OFFLINE)

Paste the following in the Down Script section:

:local host "YourServerName"
:local status "OFFLINE"
:local mailTo "simplelbase@gmail.com"
:local mailFrom "simplelbase@gmail.com"
/tool e-mail send from=$mailFrom to=$mailTo subject=($host . " " . $status) body=($host . " " . $status)

Screenshot 5

🧾 Step 5: Check Log for Sent Emails

You can verify that emails are being sent by checking the Log on your Mikrotik router. Screenshot 6


✅ Now your router will notify you via email whenever the monitored host goes OFFLINE or comes ONLINE again!