I have an Eaton 3S 700VA UPS connected to my modem, QNAP TS-412 and an Ubuntu Server. The Eaton's USB connection goes into my Ubuntu Server.
I was wondering what software is the best for managing power interruptions. Specifically, I want to get the Ubuntu Server to tell the QNAP to shut down when there is no power, send an email to my gmail, and shutdown.
The usual package used to monitor a UPS is Network UPS Tools, which is packaged in Ubuntu as
nut
. Your model is listed as supported through theusbhid-ups
driver on their website.Among other features, NUT includes a client/server architecture that lets one machine make the UPS status available over the network. This is useful in cases where you have a single UPS powering multiple machines, as in your situation.
Here's the commands I used to setup
nut
for my Eaton 3s 700VA UPS on Ubuntu 12.04.To have the modem shutdown and and have an email sent to yourself you'll need to write a bash script and edit
SHUTDOWNCMD "/sbin/shutdown -h +0"
in /etc/nut/upsmon.conf