Nut Client shutdown if Battery On, and not if LOW Battery

mimk97

New Member
Dec 6, 2024
3
0
1
Hi.
i use Proxmox 8.3.1 with a Qnap in my LAN.
Is it possible to shutdown the Proxmox if Status is "On Battery" and not on "Low Battery" ?
 
I actually have a HA VM on the Proxmox node that has a NUT client that reads the Status data of the UPS (provided by the NUT server) & when the status goes to OB (on battery) for a period of time, shuts down the Proxmox node. I do it via SSH. You could also do it via API.
 
Last edited:
I actually have a HA VM on the Proxmox node that has a NUT client that reads the Status data of the UPS (provided by the NUT server) & when the status goes to OB (on battery) for a period of time, shuts down the Proxmox node. I do it via API. You could also do it via SSH.
Hi. I use also HA on VM :)
Do you have a Howto?
 
I currently use the SSH method. (I edited my above post).

Do you have a Howto?
Sorry I do not.

However you could see this post of mine which gives an overview to the SSH or API method & links to 2 other posts which show commands used.

Whichever route you choose, you will then add a shell_command: to your configuration.yaml which will contain the specific command needed to shutdown the node.

Assuming you have the NUT config already setup in HA, you will then write an automation which when triggered by the OB state of the UPS will issue the above shell command.

I think you have enough info to get you going, (it is not that difficult). If you need further help - I'll try & answer.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!