[Nut-upsuser] upsd "events"

Jason Antman jason at jasonantman.com
Sat Nov 7 16:18:55 GMT 2020


Hello,

I'm quite new to NUT, currently setting it up on a few machines in my home
lab because I switched from an APC UPS to a CyberPower unit. This is
running in a home lab, and I'm trying to implement some apparently unusual
logic around load-shedding. I'm strongly considering writing my own custom
script to replace upsmon in order to achieve the desired result.

I see a lot of mention in the documentation on upsmon and upssched about
"events", as in an ONBATT, LOWBATT, ONLINE, etc., however I see nothing
about these in the Network protocol documentation.

Can someone please confirm whether there are actual "events" being sent out
to clients by upsd, or whether these events are
completely derived/generated within upsmon, just based on polling upsd and
detecting a change in something (such as ups.status)?

Thanks so much,
Jason Antman

PS - Since someone may ask about it, given my introduction, here's the
setup I have:

* One CyberPower UPS powering everything
* Three Linux machines, "A", "B", and "C"
* A bunch of network devices, as well as two Raspberry Pis

I'm trying to achieve the following shutdown behavior:
* Kill host A when battery drops to 80%
* Kill host B at 50%
* Kill host C at 10%
* Leave the outputs turned on always, so the network and Pis keep running
* If the power comes back before the battery is exhausted, a script will
turn on hosts A, B, and C via wake-on-lan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20201107/82bceca4/attachment.html>


More information about the Nut-upsuser mailing list