# {{ ansible_managed }} MONITOR {{ ups_name }}@localhost 1 upsmon {{ nut_upsmon_password }} master MINSUPPLIES 1 SHUTDOWNCMD "/usr/bin/systemctl poweroff" NOTIFYCMD /usr/bin/upssched # upsmon drops this file before halting; /lib/systemd/system-shutdown/nutshutdown # reads it late in shutdown and, if present, tells the UPS to cut its output. # That AC drop-and-return is what triggers the R415's always-on restore policy # and this host's BIOS "After Power Loss: Power On". upsmon has NO compiled-in # default for this - leave it unset and the UPS never powers down. # Must be on tmpfs: a persistent path can go stale and make every ordinary # reboot look like a forced shutdown. POWERDOWNFLAG /run/nut/killpower POLLFREQ 5 POLLFREQALERT 5 # Wait up to 30s for the truenas slave to disconnect before we halt. HOSTSYNC 30 DEADTIME 15 RBWARNTIME 43200 NOCOMMWARNTIME 300 FINALDELAY 5 # SYSLOG puts every UPS event in the journal, which fluent-bit already # forwards to Graylog (see roles/common/tasks/fluent-bit.yml). # EXEC runs NOTIFYCMD, i.e. upssched, which drives the TrueNAS restore. NOTIFYFLAG ONLINE SYSLOG+EXEC NOTIFYFLAG ONBATT SYSLOG+EXEC NOTIFYFLAG LOWBATT SYSLOG+EXEC NOTIFYFLAG FSD SYSLOG+EXEC NOTIFYFLAG COMMOK SYSLOG+EXEC NOTIFYFLAG COMMBAD SYSLOG+EXEC NOTIFYFLAG SHUTDOWN SYSLOG+EXEC NOTIFYFLAG REPLBATT SYSLOG NOTIFYFLAG NOCOMM SYSLOG NOTIFYFLAG NOPARENT SYSLOG