[Nut-upsuser] Delay for ONBATT event

Roger Price roger at rogerprice.org
Mon Feb 11 12:21:21 GMT 2019


On Sat, 9 Feb 2019, Fred F wrote:

> my UPS (APC SMC1000C) goes to ONBATT every day for a few seconds. This
> event is emitted because of the short daily UPS self-test, which
> cannot be disabled.
>
> Depending on the poll interval upsmon/NUT sometimes picks this event
> up and a power failure is logged, even if this is not a real power
> outage. I would like to prevent that.
>
> Now I was wondering if there is a way to delay the ONBATT event for a
> few seconds, so it would only get emitted if the UPS is at ONBATT for
> at least ~6 seconds? I am coming from apcupsd, where there was a
> "ONBATTERYDELAY" option for this exact purpose, but I have not found
> an equivalent for upsmon/NUT yet. Any ideas?

You could try playing with the POLLFREQ and POLLFREQALERT options in 
upsmon.conf, but a clean solution requires the use of timers, for example using 
upsched and a custom script.

Roger



More information about the Nut-upsuser mailing list