Notify servers of network power loss so they begin shutting down.
CyberPower UPS
I recently bought a CyberPower OR600ELCDRM1U UPS as my previous one was not rack-mountable. The unit is dead quiet and short depth which are my reasons for buying it. It holds 600Va which I've found is enough for 3 servers and a PoE+ switch to shutdown within 5 minutes.
Network UPS Tools
My previous UPS was connected to my all-in-one ESXi host using CyberPower's PowerPanel software. This worked at the time as I only had one server to power down.
Network UPS Tools (NUT) is a software similar to CyberPower's PowerPanel except it works across multiple devices in a master-slave (server-client) architecture.
NUT has a very long compatibility list. My device is not official supported but it is equivalent to the OR700LCDRM1U which CyberPower also sell in USA.
Configuration and Deployment
Master
NUT system requirements are very small. I got it running on a Ubuntu 18.04 LTS server with 1 CPU, 256MB RAM and 16GB of storage.
I created an Ansible role to deploy it. It can be found on my GitHub
There is a very important setting that's not default to not turn off the entire UPS. Disabling the SHUTDOWNCMD
and POWERDOWNFLAG
setting (like I've done here) will prevent that.
Slaves
ESXi
Rene Margar has created a NUT client for ESXi (works for me on 6.7U1). It can be found from his website.
FreeNAS
FreeNAS comes with the NUT client under it's Services menu.
OPNsense
OPNsense comes with the NUT client under it's Services menu.