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
Adding new Netwatch host
Enter IP address of host
Interval - how frequently will be checked host
Timeout - max time of without activity to trigger.
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"
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"
Checking in Log file that email sent when host is OFFLINE.
Video
user13