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

2009-12-30 Thread Yury V. Zaytsev
On Tue, 2009-12-29 at 15:20 +0100, Arjen de Korte wrote: > Citeren "Yury V. Zaytsev" : > > > Please keep the list traffic on the list so that the others can benefit. > > But please note that the messages are in English. If it is in Russian, > feel free to take it off-list. Or rather use Google

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

2009-12-29 Thread Arjen de Korte
Citeren "Yury V. Zaytsev" : Please keep the list traffic on the list so that the others can benefit. But please note that the messages are in English. If it is in Russian, feel free to take it off-list. Best regards, Arjen -- Please keep list traffic on the list _

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

2009-12-29 Thread Yury V. Zaytsev
Hi! Please keep the list traffic on the list so that the others can benefit. 1) Be sure that an MTA is installed and working: mail -s "Test" y...@mail.com < Юрий! > Подскажите , какие изменения нужно сделать в upsmon.conf , чтобы ваш скрипт > выполнялся? > указал путь к скрипту- > > NOTIFYCMD

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

2009-12-28 Thread Yury V. Zaytsev
On Mon, 2009-12-28 at 22:02 +0100, Arjen de Korte wrote: > This is trivial to script. Create an empty file somewhere your > CMDSCRIPT has write access to when the 'linedown' timer elapses (ie, > when you send the warning mail). In your 'lineup' event check for the > presence of this file. If

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

2009-12-28 Thread Arjen de Korte
Citeren "Yury V. Zaytsev" : [...] It sends a power back e-mail no matter what, but probably we can live with it. This is trivial to script. Create an empty file somewhere your CMDSCRIPT has write access to when the 'linedown' timer elapses (ie, when you send the warning mail). In your 'li

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

2009-12-28 Thread Yury V. Zaytsev
Hi! On Mon, 2009-12-28 at 20:54 +0100, Arjen de Korte wrote: > 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. OK, I will try to put it the other way around :-) (let's assume that the UPS b

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

2009-12-28 Thread Arjen de Korte
Citeren "Yury V. Zaytsev" : 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 pow

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

2009-12-28 Thread Yury V. Zaytsev
Hi! On Mon, 2009-12-28 at 08:26 -0500, Justin Piszcz wrote: > > For no. 1: 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

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

2009-12-28 Thread Yury V. Zaytsev
Hi! Thank you guys for quick and helpful replies! I really appreciate it. I'm in the progress of writing the greatest notification script ever. On Mon, 2009-12-28 at 14:29 +0100, Arjen de Korte wrote: > Try the 'blazer_usb' driver instead, although this might not > (completely) solve this prob

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

2009-12-28 Thread Arjen de Korte
Citeren "Yury V. Zaytsev" : 1) I want it to notify me by email on power loss and power back events. I can't find any sample scripts for this purpose... Where shall I look for them? Use 'upssched' and configure it to send a message through 'mailx' or something like that after the power is los

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

2009-12-28 Thread Justin Piszcz
Hi, For no. 1: 1. Edit upsmon.conf 2. Specify NOTIFYCMD: NOTIFYCMD /etc/nut/notify.sh 3. Make sure the script is executable & that it works prior to adding it here. 4. Then just make a simple script: #!/bin/bash DATE=$(/bin/date) HOST=$(/bin/hostname | cut -f1 -d'.') echo "$*" | mailx -s

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

2009-12-28 Thread Yury V. Zaytsev
Hi there! I'm a n00b NUT user trying to get it running on RHEL5 and actually do something useful for me. Few questions: 1) I want it to notify me by email on power loss and power back events. I can't find any sample scripts for this purpose... Where shall I look for them? 2) So far, I've backpor