From Hentschel
Jump to: navigation, search

NUT and UPS

1,166 bytes added, 08:28, 20 May 2018
* configure nut, link with instructions https://wiki.ipfire.org/addons/nut/detailed
* configuration files in ''/etc/nut''
*:* configure UPS type in ''nut.conf''
<pre>
MODE=standalone
</pre>
*:* configure ''ups.conf''
<pre>
[tripplite-1500lcd]
</pre>
*:* configure the UPS daemon via ''upsd.conf''
<pre>
LISTEN 127.0.0.1 3493
LISTEN 192.168.1.108 3493
</pre>
*:* and add users to ''upsd.users''
<pre>
[admin]
password = xxxxx
upsmon slave
</pre>
 
:* 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>