# NUT master upsmon.conf — UPS-connected host (e.g. 10.0.30.100)
# Place at /etc/nut/upsmon.conf on the NUT master host.
# Replace <NUT_MASTER_PASSWORD> before deploying.
#
# Master mode: monitors the local UPS directly via upsd.
# Uses upssched as NOTIFYCMD for timed FSD (30s on battery → force shutdown).
# Master shuts down LAST — slaves receive FSD and shut down first.

MONITOR apc@localhost 1 upsadmin <NUT_MASTER_PASSWORD> upsmon master

MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h now"
NOTIFYCMD /usr/sbin/upssched
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG "/etc/killpower"
OFFDURATION 30
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5

NOTIFYFLAG ONLINE SYSLOG+WALL
NOTIFYFLAG ONBATT SYSLOG+WALL
NOTIFYFLAG LOWBATT SYSLOG+WALL
NOTIFYFLAG FSD SYSLOG+WALL
NOTIFYFLAG SHUTDOWN SYSLOG+WALL
NOTIFYFLAG COMMOK SYSLOG
NOTIFYFLAG COMMBAD SYSLOG+WALL
