Any hardware store will have AVR's. Get a good quality one. It will give you constant continuous power, until it drops so much it can't cope and will disrupt power all together.
Combine it with a UPS that you connect AFTER the AVR and you will protect from uninterrupted power loss too. Only having a UPS will give you problem. I used only UPS for a server that for a while, but as it will switch over to battery power when voltage drop, rather than regulate it, you will not notice when you are on battery power, and suddenly the server will be unavailable and when you check you see that voltage has dropped, UPS switched to battery until drained and then powered down the server. With an AVR the UPS will not switch to battery unless you have a power outage.