Alert on AS Route becomes inactive

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:

  1. Change the email address in the script
  2. Change the comment search text
  3. Make sure the SMTP server is setup properly so that the mikrotik can send emails
  4. Schedule the script to run every few minutes.
  5. 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.