Anyone figure how to do this? I have the NUT package installed on my pfSense & can see the UPS status for it, but I was hoping it could send the shutdown signal to XCP-NG to shut down the VMs & also my FreeNAS box. Any suggestions?
NUT uses a server (upsd) and a client (upsmon). This looks helpful.
The project docs are also quite good.
I run a Raspberry Pi that is connected to the UPS running the Nut server. I then have a VM that I run a Discord bot on that I can execute commands to get the status of the UPS, run a self test, and Start/Stop VMs on XCP NG.
I’m currently working on implementing the NUT ONBATT ONLINE, and LOWBATT alerts to execute a upssched script that will automatically shutdown all of my hosts, including pfsense, when the battery level starts to get critical.
I use the nut package on pfSense that connects to the Raspberry Pi to monitor. I only use this for the nice widget on the dashboard.
I found this method to be easier than configuring a client on every host I have with it’s own script. It’s still a work in progress but hopefully you find this a little bit helpful.
LinuxGreg’s link to the hackermoon.com Tutorial is a great start to understand how you can implement nut.