I would like to configure NUT UPS monitoring software under Linux to simply page me when the UPS goes onto battery power, and then when it returns to line power. For example, when I receive the following messages from upsmon in syslog:
Aug 19 05:43:27 jupsden upsmon[466]: UPS jupsden@localhost on battery
Aug 19 05:43:42 jupsden upsmon[466]: UPS jupsden@localhost on line power
And, maybe the best solution is a custom syslog rule?
But, all of the examples I have seen for NUT-specific configured notifications in /etc/nut/upssched.conf were for starting a timer when the UPS battery level reaches a certain low threshold, then passing a custom parameter to a custom script upssched-cmd, gracefully shutting down systems, etc. Using the "timer" approach, could I do something like the following in upssched.conf:
AT ONBATT * START-TIMER onbatterypower 0
AT ONLINE * CANCEL-TIMER onlinepower
...or are there some different / better NUT conf commands that would achieve what I want to do?