====== FreeBSD NUT Client ======
Install and enable the upsmon driver from nut
# install the full nut package
pkg install nut
# Tell sysrc to enable upsmon
sysrc nut_upsmon_enable="YES"
# verify you have a connection to the master
upsc ups1@192.168.1.100
Configure two files, both in /usr/local/etc/nut
# this will not do anything except communicate with the master
# to get the status
MODE=netclient
# standard default values for monitoring
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/poweroff"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG "/etc/killpower"
OFFDURATION 30
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5
# this is what we're monitoring
MONITOR ups1@192.168.1.100:3493 1 upsmon mypassword slave
Start the service
service nut_upsmon start
If you get an error, run the following command to see what config is messed up
upsmon -DD
This runs upsmon in the foreground, with the debug flag on. Press ctl-c to exit
===== Links =====
* https://dan.langille.org/2020/09/07/monitoring-your-ups-using-nut-on-freebsd/