installing ups monitor

Karl Auer kauer at biplane.com.au
Sun Jan 10 09:19:14 UTC 2021


On Sun, 2021-01-10 at 09:20 +0100, Bo Berglund wrote:
> I wonder how exactly this is done?

The startup failure is probably because the config is not yet correct.
Get the config correct and it will probably start.

I dug out my old laptop and grabbed the config files from it: all in
/etc/nut: nut.conf, upsmon.conf and upssched.conf.

nut.conf contains one line:

MODE=netclient

upsmon.conf has a few lines:

RUN_AS_USER nut
MONITOR ups at 192.168.1.3:3493 1 monuser XXXXXXX slave
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5

upssched.conf has only one:

CMDSCRIPT /bin/upssched-cmd

Read the man pages for the details of what those lines mean.

The above reminds me what I did and how I did it. Because I run a
Synology NAS, it is important me that it is shutdown in an orderly
fashion if the power fails. Synology NASes understand APC UPSes out of
the box, so I used it as a networked UPS monitor and told NUT to check
the NAS, rather than check the UPS directly. monuser and XXXXXXX are
the creds it uses to talk to the NAS via SNMP.

If the power failed, the UPS would tell the NAS; the NAS would tell
anyone who asked, which was what my laptop did via NUT.

So I'm not sure that my configuration is that useful to you. I've never
used NUT directly via USB, and I don't know if it's even possible, but
even a cursory search suggests that it does, albeit via a driver that
you may need to install.

That's about all I can offer. Hope someone else has it sorted and can
guide you!

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer

GPG fingerprint: 2561 E9EC D868 E73C 8AF1 49CF EE50 4B1D CCA1 5170
Old fingerprint: 8D08 9CAA 649A AFEF E862 062A 2E97 42D4 A2A0 616D







More information about the ubuntu-users mailing list