From Hentschel
(→Configure UPS monitoring) |
|||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | * link with instructions https://wiki.ipfire.org/addons/nut/detailed | ||
+ | * link to NUT site, with tool for compatibility check: https://networkupstools.org | ||
+ | * Tripp-Lite 1500 LCD manual: https://assets.tripplite.com/owners-manual/932668.pdf | ||
+ | |||
+ | |||
+ | == Install software == | ||
* install nut | * install nut | ||
sudo apt-get install nut | sudo apt-get install nut | ||
− | + | ||
+ | == Configuration == | ||
* configuration files in ''/etc/nut'' | * configuration files in ''/etc/nut'' | ||
− | + | ||
+ | === NUT driver config === | ||
+ | :* configure UPS type in ''nut.conf'' | ||
<pre> | <pre> | ||
MODE=standalone | MODE=standalone | ||
</pre> | </pre> | ||
− | + | :* configure ''ups.conf'' | |
<pre> | <pre> | ||
[tripplite-1500lcd] | [tripplite-1500lcd] | ||
Line 14: | Line 23: | ||
desc = "The black UPS in the rack upstairs" | desc = "The black UPS in the rack upstairs" | ||
</pre> | </pre> | ||
+ | :* check communication | ||
+ | sudo upsdrvctl start | ||
− | + | === Configure UPS daemon === | |
+ | :* configure the UPS daemon via ''upsd.conf'' | ||
<pre> | <pre> | ||
LISTEN 127.0.0.1 3493 | LISTEN 127.0.0.1 3493 | ||
LISTEN 192.168.1.108 3493 | LISTEN 192.168.1.108 3493 | ||
</pre> | </pre> | ||
− | + | :* and add users to ''upsd.users'' | |
<pre> | <pre> | ||
[admin] | [admin] | ||
Line 32: | Line 44: | ||
upsmon slave | upsmon slave | ||
</pre> | </pre> | ||
+ | :* check configuration, read data values | ||
+ | upsc tripplite-1500lcd@localhost | ||
+ | |||
+ | === Configure UPS monitoring === | ||
+ | :* configure the UPS monitoring daemon, edit upsmon.conf | ||
+ | <pre> | ||
+ | RUN_AS_USER root | ||
+ | |||
+ | MONITOR apc-1500@localhost 1 admin xxxx master | ||
+ | MINSUPPLIES 1 | ||
+ | SHUTDOWNCMD "/sbin/shutdown -h +0" | ||
+ | NOTIFYCMD /usr/sbin/upssched | ||
+ | POLLFREQ 2 | ||
+ | POLLFREQALERT 1 | ||
+ | HOSTSYNC 15 | ||
+ | DEADTIME 15 | ||
+ | POWERDOWNFLAG /etc/killpower | ||
+ | |||
+ | NOTIFYMSG ONLINE "UPS %s on line power" | ||
+ | NOTIFYMSG ONBATT "UPS %s on battery" | ||
+ | NOTIFYMSG LOWBATT "UPS %s battery is low" | ||
+ | NOTIFYMSG FSD "UPS %s: forced shutdown in progress" | ||
+ | NOTIFYMSG COMMOK "Communications with UPS %s established" | ||
+ | NOTIFYMSG COMMBAD "Communications with UPS %s lost" | ||
+ | NOTIFYMSG SHUTDOWN "Auto logout and shutdown proceeding" | ||
+ | NOTIFYMSG REPLBATT "UPS %s battery needs to be replaced" | ||
+ | NOTIFYMSG NOCOMM "UPS %s is unavailable" | ||
+ | NOTIFYMSG NOPARENT "upsmon parent process died - shutdown impossible" | ||
+ | |||
+ | NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC | ||
+ | NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC | ||
+ | NOTIFYFLAG LOWBATT SYSLOG+WALL | ||
+ | NOTIFYFLAG FSD SYSLOG+WALL+EXEC | ||
+ | NOTIFYFLAG COMMOK SYSLOG+WALL+EXEC | ||
+ | NOTIFYFLAG COMMBAD SYSLOG+WALL+EXEC | ||
+ | NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC | ||
+ | NOTIFYFLAG REPLBATT SYSLOG+WALL | ||
+ | NOTIFYFLAG NOCOMM SYSLOG+WALL+EXEC | ||
+ | NOTIFYFLAG NOPARENT SYSLOG+WALL | ||
+ | |||
+ | RBWARNTIME 43200 | ||
+ | |||
+ | NOCOMMWARNTIME 600 | ||
+ | |||
+ | FINALDELAY 5 | ||
+ | </pre> | ||
+ | |||
+ | :* check available variables (this UPS only seems to have one) | ||
+ | upsrw tripplite-1500lcd@localhost | ||
+ | |||
+ | == Running UPS == | ||
+ | * if NUT driver not enabled (happens when system is booted up w/o the UPS USB cable plugged in) | ||
+ | sudo upsdrvctl start |
Latest revision as of 01:49, 8 June 2018
- link with instructions https://wiki.ipfire.org/addons/nut/detailed
- link to NUT site, with tool for compatibility check: https://networkupstools.org
- Tripp-Lite 1500 LCD manual: https://assets.tripplite.com/owners-manual/932668.pdf
Contents
Install software
- install nut
sudo apt-get install nut
Configuration
- configuration files in /etc/nut
NUT driver config
- configure UPS type in nut.conf
MODE=standalone
- configure ups.conf
[tripplite-1500lcd] driver = usbhid-ups port = auto desc = "The black UPS in the rack upstairs"
- check communication
sudo upsdrvctl start
Configure UPS daemon
- configure the UPS daemon via upsd.conf
LISTEN 127.0.0.1 3493 LISTEN 192.168.1.108 3493
- and add users to upsd.users
[admin] password = xxxxx actions = SET FSD instcmds = ALL upsmon master [ups] password = xxxxx upsmon slave
- check configuration, read data values
upsc tripplite-1500lcd@localhost
Configure UPS monitoring
- configure the UPS monitoring daemon, edit upsmon.conf
RUN_AS_USER root MONITOR apc-1500@localhost 1 admin xxxx master MINSUPPLIES 1 SHUTDOWNCMD "/sbin/shutdown -h +0" NOTIFYCMD /usr/sbin/upssched POLLFREQ 2 POLLFREQALERT 1 HOSTSYNC 15 DEADTIME 15 POWERDOWNFLAG /etc/killpower NOTIFYMSG ONLINE "UPS %s on line power" NOTIFYMSG ONBATT "UPS %s on battery" NOTIFYMSG LOWBATT "UPS %s battery is low" NOTIFYMSG FSD "UPS %s: forced shutdown in progress" NOTIFYMSG COMMOK "Communications with UPS %s established" NOTIFYMSG COMMBAD "Communications with UPS %s lost" NOTIFYMSG SHUTDOWN "Auto logout and shutdown proceeding" NOTIFYMSG REPLBATT "UPS %s battery needs to be replaced" NOTIFYMSG NOCOMM "UPS %s is unavailable" NOTIFYMSG NOPARENT "upsmon parent process died - shutdown impossible" NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC NOTIFYFLAG LOWBATT SYSLOG+WALL NOTIFYFLAG FSD SYSLOG+WALL+EXEC NOTIFYFLAG COMMOK SYSLOG+WALL+EXEC NOTIFYFLAG COMMBAD SYSLOG+WALL+EXEC NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC NOTIFYFLAG REPLBATT SYSLOG+WALL NOTIFYFLAG NOCOMM SYSLOG+WALL+EXEC NOTIFYFLAG NOPARENT SYSLOG+WALL RBWARNTIME 43200 NOCOMMWARNTIME 600 FINALDELAY 5
- check available variables (this UPS only seems to have one)
upsrw tripplite-1500lcd@localhost
Running UPS
- if NUT driver not enabled (happens when system is booted up w/o the UPS USB cable plugged in)
sudo upsdrvctl start