This is for Ubuntu Server 12.04 64-bit.
Install the NUT software
sudo apt-get install nut
edit file /etc/nut/ups.conf
Scroll down to the example, uncommenting and configuring. Locate the correct driver to use from this page. (Most USB UPSes using the usbhid-ups driver, and port set to auto). Example:
[myups] driver = usbhid-ups port = auto
Note the tag used in the brackets, you will need this later.
edit file /etc/nut/upsd.users
Find the section entitled “Configuring for upsmon”, uncomment and configure, using the example given.
Next edit upsmon.conf and add the example MONITOR line provided in upsd.users, adjusted for your settings.
Lastly, edit nut.conf and set appropriately.
service nut restart
If you get this error:
* Restarting Network UPS Tools [ OK ] Broadcast Message from [email protected] (somewhere) at 21:52 ... Communications with UPS [email protected] lost Broadcast Message from [email protected] (somewhere) at 21:52 ... UPS [email protected] is unavailable
Run the following commands as root:
udevadm control --reload-rule udevadm trigger upsdrvctl start