Difference between revisions of "NUT"

From Mark Furneaux's Wiki
Jump to: navigation, search
(Created page with "'''NUT''', or Network UPS Tools, is a system for monitoring UPSes over a network. ==Installation== Install NUT with:<br> <code># apt install nut</code> ==Configuration== ===...")
(No difference)

Revision as of 17:27, 9 May 2017

NUT, or Network UPS Tools, is a system for monitoring UPSes over a network.

Installation

Install NUT with:
# apt install nut

Configuration

Server

Add a UPS driver in /etc/nut/ups.conf:

[cp1500pfclcd]
      driver = usbhid-ups
      port = auto
      desc = "tesla"
      sdorder = -1

You will need to comment out maxretry = 3 since it is not supported by upshid-ups.

Start the driver with:
# upsdrvctl start

Add the addresses to listen on in /etc/nut/upsd.conf:

LISTEN 127.0.0.1 3493
LISTEN ::1 3493
LISTEN 192.168.30.100 3493
LISTEN 192.168.10.100 3493

Set the operating mode in /etc/nut/nut.conf:

MODE=netserver

Create 2 users in /etc/nut/upsd.users:

[upsmonuser]
        password = <passwd>
        actions = SET FSD
        instcmds = ALL
        upsmon master

[upsmonuserslave]
        password = <passwd>
        upsmon slave

Setup a monitor on the master in /etc/nut/upsmon.conf:

MONITOR cp1500pfclcd@localhost 1 upsmonuser <passwd> master

Tear down the temporary daemons:
# upsd -c stop
# upsdrvctl stop

Start the daemon with:
# systemctl start nut-server.service

Start the monitor with:
# systemctl start nut-monitor.service

Client

Set the operating mode in /etc/nut/nut.conf:

MODE=netclient

Setup a monitor on the master in /etc/nut/upsmon.conf:

MONITOR cp1500pfclcd@192.168.30.100 1 upsmonuserslave <passwd> slave

Start the monitor with:
# systemctl start nut-monitor.service