I hate to revive an old thread, but this script worked perfectly the first time and the poster deserves a kudos. Thank you!
My condition: My office has 3 WAN routes. Because they are fail-over and load-balanced, if one ISP fails, internet access is not affected and nobody knows. So I needed a script which would detect when a route fails and sends an email.
All I needed to do was:
- Change the email address in the script
- Change the comment search text
- Make sure the SMTP server is setup properly so that the mikrotik can send emails
- Schedule the script to run every few minutes.
- Repeat for WAN-2 and WAN-3
I am a beginner to MT scripting and this script worked flawlessly. I don’t know if it is the optimal way to do so but for now it is perfect.