I've downloaded Nut software for UPS monitoring.
http://eu1.networkupstools.org/source.html
Here are configuration files:
ups.conf
------------------------------------------------------------------------
[empire]
driver = powermust
port = /dev/ttyS0
desc = "EMPIRE UPS"
------------------------------------------------------------------------
upsd.conf
------------------------------------------------------------------------
ACL all 0.0.0.0/0
ACL localhost 127.0.0.1/32
ACCESS grant all localhost
ACCESS deny all all
------------------------------------------------------------------------
upsd.users
------------------------------------------------------------------------
[admin]
password = qq
allowfrom = localhost
actions = set
instcmds = all
[empire]
password = qq
allowfrom = localhost
upsmon master
------------------------------------------------------------------------
upsmon.conf
------------------------------------------------------------------------
RUN_AS_USER nut
MONITOR empire@localhost empire qq master
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/reboot"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG "/etc/killpower"
NOTIFYFLAG ONLINE WALL
NOTIFYFLAG ONBATT WALL
NOTIFYFLAG LOWBATT WALL
NOTIFYFLAG SHUTDOWN WALL
FINALDELAY 5
------------------------------------------------------------------------
Starting scripts:
------------------------------------------------------------------------
/usr/local/ups/bin/upsdrvctl start
/usr/local/ups/sbin/upsd
------------------------------------------------------------------------
This two scripts runs great -- everything looks like it must be.
But after I run:
/usr/local/ups/sbin/upsmon
I get this error:
Network UPS Tools upsmon 1.4.1
Unable to use old-style MONITOR line without a username
Convert it and add a username to upsd.users - see the documentation
Fatal error: unusable configuration
But I am using new MONITOR line.
Maybe someone has had something similar?