[Nut-upsuser] Need the date included in nuts -wall msgs.
clepple at gmail.com
Tue Aug 18 13:50:32 UTC 2015
On Aug 18, 2015, at 3:27 AM, Gene Heskett <gheskett at wdtv.com> wrote:
> Greetings all;
> Is it possible to set a logging option in one of the config files so that
> when we have a 1 second power bump, the date is included, both in the
> log, and in the -wall broadcast?
The syslog entry should have one-second resolution in the timestamps, and you could use the "EXEC" option in "NOTIFYFLAG" in upsmon.conf to call your own script on the ONBATT and ONLINE events (which would allow you to pass whatever message you want to "wall").
However, for a one-second glitch, many of the NUT drivers might miss that in their polling cycle. (This usually isn't a problem, since an UPS with a good battery should be able power the load for much longer than one poll interval.)
This is one of the few cases where a "dumb" contact-closure UPS and a dedicated serial port monitor program might be a better fit. Which driver(s) are you using?
clepple at gmail
More information about the Nut-upsuser