networkupstools / nut

The Network UPS Tools repository. UPS management protocol Informational RFC 9271 published by IETF at https://www.rfc-editor.org/info/rfc9271 Please star NUT on GitHub, this helps with sponsorships!
https://networkupstools.org/
Other
1.78k stars 340 forks source link

How do i add 2 battery charge threshold to shutdown slave and master at different levels #2498

Open KingObal opened 3 weeks ago

KingObal commented 3 weeks ago

Hello everyone !

I started to use nut and i followed tutorials to use a timer to shutdown my proxmox server after X minutes on battery. Nut is curently running on a pfsense with the nut package.

But i my boss would prefer to shut down this proxmox when the ups battery level hit 30%. i used the "override.battery.charge.low" in my ups.conf because my ups doesn't have this information. So I could use the LOWBATT to shutdown the client.

The final goal is to shut down the pfsense in last, when the battery hits 10%.

I searched the web for quite a while but couldn't find the answer to configure it.

i'm using SNMP to communicate between the pfsense and the UPS (Cyberpower OR600ELCDRM1U and the RMCARD205)

Thank you for your time and for your help !

I can give you more informations if needed about the conf files or anything !

Maxime.

jimklimov commented 3 weeks ago

Hello, currently on the road s can't go into detail, but IIRC the NUT Configuration Examples book may have details on that: https://networkupstools.org/documentation.html => https://github.com/networkupstools/ConfigExamples/releases/latest/download/ConfigExamples.pdf

IIRC it can generally be done with upssched as the notification handler for upsmon, and further setting up your custom script with particular timings per host.

I think there was an RFE issue posted to have this out of the box in upsmon.conf but was not addressed yet.