apt-get install nut
- Edit
/etc/nut/nut.conf
:
MODE=netclient
- Edit
/etc/nut/upsmon.conf
:MONITOR <system> <powervalue> <username> <password> ("master"|"slave")
:
MONITOR [email protected] 1 upsmon password slave
- Start monitoring:
upsmon start
- To check UPS status:
upsc <name>
for direct attached units orupsc <name>@<address>
for remote
upsc [email protected]
No other scripts in my setup. It is a graceful shutdown including all VMs.
Client performs action based on server configuration.
My server is NUT service inside TrueNAS VM. It is configured to shutdown after N minutes of ONBATT state.
If communication is lost NUT should spam you with e-mails until it is fixed, but there must be a valid account configured for each system's e-mail MTA (e.g. postfix)