On Tue, 2018-05-08 at 11:27:45 +0000, Pilch, Alexander wrote:
> Hi,
> 
> 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
the switch".
I personally dislike timers.

- S

_______________________________________________
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Reply via email to