[Nut-upsuser] how to use multiple UPS with timers
steffen.grunewald at aei.mpg.de
Tue May 8 13:28:12 BST 2018
On Tue, 2018-05-08 at 11:27:45 +0000, Pilch, Alexander wrote:
> I need to shut down a VMWare host if both connected UPS are x minutes on battery. Both UPS are connected via SNMP.
> Because there are multiple vm running on that host, shutting every vm down takes some time. So most likely, waiting for low battery, the time left won't be enough. I tried overwriting the settings for low battery but that didn't work.
> Are timers the only possible solution to this problem? If I use timers, the host will be shut down if one of the UPS is on battery, even if the other UPS is still online.
> Do I need the external script to solve this?
> I'm grateful for any suggestions.
You might tweak your NOTIFYCMD (here, /etc/nut/upssched.sh) to
query both UPSes whenever it's invoked (onbatt, lowbatt, younameit).
Since battery.low levels may be overridden you might wait for
both UPS units to go lowbatt (as per your definition), then "flip
I personally dislike timers.
More information about the Nut-upsuser