How to use a Eaton 3S 700VA UPS with Ubuntu Server?
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 the usbhid-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.
sudo apt-get install nut
sudo vim /etc/nut/ups.conf
[Eaton3S]
driver=usbhid-ups
port=auto
sudo vim /etc/nut/upsd.users
[upsmon]
password = pass
upsmon master
sudo vim /etc/nut/upsmon.conf
MONITOR Eaton3S@localhost 1 upsmon pass master
sudo vim /etc/nut/nut.conf
MODE=standalone
sudo service nut start
sudo upsc Eaton3S
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