Setting Up APC UPS Power Protection And Monitoring For Your Routerboard
1) 1 x Mikrotik Routerboard with a USB or RS232 port
2) 1 x USB or RS232 Cable
3) 1 x APC UPS with a Powerchute USB port
4) 1 x Laptop / Desktop Computer
5) 1 x RJ45 Network Cable
Step 1 : Configuring RouterOS APC UPS Protection
To sccessfully configure you RouterOS follow the steps as listed below :
1) Connect to your RouterBoard using your RJ45 network cables on ETHER2 and the ethernet port on your laptop / desktop
2)Connect a USB or RS232 cable from your RouterBoard to your APC UPS in this tutorial a USB cable was used.
3) Next go to SYSTEM > PACKAGES to check if the UPS package is installed. If you do not see it as show in the image on the left you have to download the EXTRAS package for your RouterBoard from www.mikrotik.com.
4) After successfull installation of the UPS package you should see it if you go to SYSTEM > UPS. You can check if the UPS package installation is okay by going to SYSTEM > PACKAGES and select the UPS PACKAGE and click on the CHECK INSTALLATION BUTTON(YOU SHOULD GET A INSTALLATION OK MESSAGE). Also ensure that your RouterOS version is on the latest stable version to ensure installation success.
6) The OFFLINE TIME value is the duration that the RouterBooaurd will run whilst on battery. The RouterBoard waits for the amount of time configured and if this time lapse it goes into hibernation mode until the UPS reports that normal power has been restored.
The MIN RUN TIME value is used by RouterOS such that when a power failure occurs RouterOS will monitor the runtime-left value and will go to hibernate mode when this time value is reached.
Step 2 : Configuring Power Monitoring
7) Here we are going to configure UPS power minitoring so that when a power fault occurs you will get an email notification informing you that UPS power is online or offline/ on battery. To do this follow these steps :
a) Connect and login to your Routerboard and go to SYSTEM > LOGGING and click on the ACTIONS tab.
b) Next click on the ADD button to add a new action (This will dictate what action should be taken by the log event).
c) Add any name you would like in the NAME input box, set the TYPE to email and add the email address you would like to send to the the EMAIL input box.
d) Click APPLY and OK
8) Next add a new RULE that will execute the ACTION you created in the prevous step. Select the RULES tab and click the ADD button.
a) In the NEW LOG RULE WINDOW select the TOPICS dropdwn menu and select UPS.
b) leave the PREFIX drop down empty and on the ACTION dropdown select the action that you created in the privious step, press APPLY and OK.
c) If you following these steps correctly you can go forward to test your setup. Results may vary depending on UPS use however if you swift the UPS off and back one again you should see UPS logs in the Log section in Winbox, also check your email account to see if RouterOS is sending logs. The images below illustrate this