Differences between revisions 5 and 6
Revision 5 as of 2021-04-14 17:49:53
Size: 2658
Editor: ccts
Comment:
Revision 6 as of 2021-04-14 23:05:19
Size: 2670
Editor: PaulWise
Comment: cleanups
Deletions are marked like this. Additions are marked like this.
Line 12: Line 12:
Following instructions were made on Debian Buster.
Line 16: Line 14:
Depending on your NUT deployment plan, you will likely need DebianPkg:nut:

{{{
# Will install both nut-client and nut-server
apt install nut
}}}
Depending on your NUT deployment plan, you will likely need to [[PackageManagement#Install|install]] the DebianPkg:nut metapackage, which will install the DebianPkg:nut-client and DebianPkg:nut-server packages.
Line 25: Line 18:
  * Systemd units will require prior configuration: nut-{client,driver,server,monitor}.service   * Services will require prior configuration: nut-{client,driver,server,monitor}
Line 38: Line 31:
lsusb $ lsusb
Line 52: Line 45:
Restart nut-server systemd unit. Restart nut-server service.
Line 55: Line 48:
systemctl restart nut-server $ sudo service nut-server restart
Line 65: Line 58:
upscmd -l eaton650 $ upscmd -l eaton650
Line 71: Line 64:
upsc eaton650 $ upsc eaton650
Line 89: Line 82:
systemctl restart nut-server $ sudo service restart nut-server
Line 109: Line 102:
systemctl restart nut-server $ sudo service nut-server restart
Line 115: Line 108:
systemctl status nut-server $ sudo service nut-server status
Line 127: Line 120:

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 restart nut-server

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