Translation(s): English -


Network UPS Tools (NUT) is a client/server monitoring system that allows computers to share uninterruptible power supply (UPS) and power distribution unit (PDU) hardware. Clients access the hardware through the server, and are notified whenever the power status changes. (See: nut)

Install packages

Depending on your NUT deployment plan, you will likely need to install the nut metapackage, which will install the nut-client and nut-server packages.

  • A nut user, whose home is /var/lib/nut, is created by the Debian package.

  • Configuration is mostly done in /etc/nut.

  • Services will require prior configuration: nut-{client,driver,server,monitor}

Configuration

Read /etc/nut/nut.conf, and specify how you plan to use NUT:

MODE=standalone

Find out the USB ID of your UPS:

$ lsusb

Describe your UPS in /etc/nut/ups.conf:

maxretry = 3

[eaton650]
        driver = usbhid-ups
        port = auto
        vendorid = 0463

Restart nut-server service.

$ sudo service nut-server restart

Check the UPS

You should now be able to communicate with the UPS.

Which commands are recognized by the UPS? (Replace eaton650 by its name from ups.conf.)

$ upscmd -l eaton650

What data it has?

$ upsc eaton650

Create a user access to upsd

Edit /etc/nut/upsd.users, it should contain something like:

[admin]
        password = some_complex_password
        actions = SET
        instcmds = ALL
        upsmon master

Restart nut-server:

$ sudo service nut-server restart

Your user access has been set up!

Monitor locally with upsmon

upsd should already be listening on localhost, which means you can monitor it locally.

Edit /etc/nut/upsmon.conf, ensure it has a MONITOR line describing how it can access upsd.

...
MONITOR eaton650@localhost 1 admin some_complex_password master
...

Restart nut-monitor:

$ sudo service nut-server restart

Ensure it doesn't complain:

$ sudo service nut-server status

Your UPS should be monitored and working!

To be continued...

  • In upsd.conf, you can ask the server to listen to other network interfaces, for other hosts (i.e: on your local area network) to access the UPS data.
  • You can set up SSL certificates and enable secure communications.
  • Customize to your needs.


CategoryHardware | CategorySystemAdministration