[Nut-upsuser] Megatec driver floods logs #2 & mail notifications

Arjen de Korte nut+users at de-korte.org
Mon Dec 28 19:54:43 UTC 2009


Citeren "Yury V. Zaytsev" <yury op shurup.com>:

> I'm actually trying to make use of upssched to avoid notifications for
> short outages like ~ 1 minute or so. So far I've added two lines:
>
> # The timers, here 60 sec after the ONBATT (ups on battery) event
> AT ONBATT * START-TIMER onbatt 60
>
> # Cancel the countdown is power is back
> AT ONLINE * CANCEL-TIMER onbatt
>
> As far as I understand, my
>
> CMDSCRIPT /mnt/data/scripts/ups-notifier
>
> will get triggered with "onbatt" parameter if the outage lasts more than
> 60 seconds, but I would like it to be triggered if, say when the power
> comes back online within a reasonable amount of time and the shutdown is
> canceled to inform everybody that there's no need to rush to the lab.

I don't understand what you want here. The above will call the  
CMDSCRIPT only when the UPS is on battery for more than 60 seconds.  
Less than that and the timer will be cancelled as soon as the power  
returns and the CMDSCRIPT will not be called (so nobody will be  
alerted).

On the other hand, if the charge of the battery is so low that a  
shutdown is initiated by the upsmon master, there is no way to cancel  
the shutdown. The UPS *will* power down, even when the power returns  
(in which case it will usually only cycle the mains).

> Is there a way to achieve these two goals at the same time?

I don't understand what you mean with first and second goal. Please  
make a timeline with events and what you want to happen at each point  
in time.

Best regards, Arjen
-- 
Please keep list traffic on the list




More information about the Nut-upsuser mailing list