Mikrotik routers have default service to check host availability, its name Netwatch. Configuration Netwatch service to send emails through default Mikrotik email client if host is offline or returned online.

Video

Winbox is connected,
Going to the section Tools -> Netwatch
mikrotik netwatch
Adding new Netwatch host
mikrotik netwatch
Enter IP address of host
Interval - how frequently will be checked host
Timeout - max time of without activity to trigger. 
mikrotik netwatch
Script to send Email then host is UP (ONLINE)
Script for UP

local host YourServerName
local status ONLINE
local mailTo simplelbase@gmail.com
local mailFrom simplelbase@gmail.com
/tool e-mail send from=$mailFrom  to=$mailTo body="$host $status" subject="$host $status"
mikrotik netwatch
Script to send Email when host is DOWN (OFFLINE)
Script for DOWN

local host YourServerName
local status OFFLINE
local mailTo simplelbase@gmail.com
local mailFrom simplelbase@gmail.com
/tool e-mail send from=$mailFrom  to=$mailTo body="$host $status" subject="$host $status"
mikrotik netwatch
Checking in Log file that email sent when host is OFFLINE. 
mikrotik netwatch
Configuring PPTP server on Mikrotik
Duino coin benchmark on Orange Pi Zero SBC

Leave a Comment

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