MikroTik Internet Light

MikroTik Routers don’t come with an “Internet” light or an easy indicator to show they have internet connection but they do usually have a multi use LED that the user can program to do whatever they want. Let’s look at an easy way of putting one onto your MikroTik.

The first step is to give yourself a permanently “On” LED. Sounds odd but there is method in this madness here. Go to System > LEDS > Create yourself a new config line set to “On” at the user-led. Once added you will need to do a quick terminal command of /system leds print and note down the number that your new config line is, below mine is number 6.

Next you need to set up the “monitor”. Under Tools > Netwatch you need to add yourself a new config line, set the host to your chosen host (8.8.8.8) is ideal as netwatch uses ping. In my example the switch is talking to the local gateway. Interval is set to a minute by default, I have since set this to a second though. Timeout is how long it goes without a response. Then you need to add in both an “Up” and “Down” script, this is where your magic from System> LEDs comes in.
Disable the LED when down with this in the Down box (numbers is the number your line appears in from the terminal output earlier) /system leds set numbers=6 disabled=yes
Enable the LED when the host is up (numbers is the number your line appears in from the terminal output earlier) /system leds set numbers=6 disabled=no

Thats it! Your USR light will now light when it sees your chosen host and go off when it can’t. Nice and easy indicator.