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

Justin Piszcz jpiszcz at lucidpixels.com
Mon Dec 28 13:26:17 UTC 2009


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 "ups@$HOST POWER ALERT on $DATE" user at addr.com


For no. 2: I am not sure, the drivers that I have used do not have that 
problem with the UPS' in use.

Justin.

On Mon, 28 Dec 2009, Yury V. Zaytsev wrote:

> 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 backported the package from Fedora and got my Ablerex
> running (previously used with Upsilon / Megatec on a Windows server).
>
> The major problem so far is that it keeps flooding my logs just as
> someone reported last year:
>
> http://www.mail-archive.com/nut-upsuser@lists.alioth.debian.org/msg03762.html
>
> Is there a way to somehow mute these messages?
>
> upsc ablerex at localhost
> battery.charge: 95.0
> battery.voltage: 13.50
> battery.voltage.nominal: 12.0
> driver.name: megatec
> driver.parameter.pollinterval: 2
> driver.parameter.port: /dev/ttyS0
> driver.version: 2.4.1
> driver.version.internal: 1.6
> input.frequency: 49.0
> input.frequency.nominal: 50.0
> input.voltage: 232.0
> input.voltage.fault: 195.0
> input.voltage.maximum: 233.0
> input.voltage.minimum: 22.0
> input.voltage.nominal: 230.0
> output.voltage: 232.0
> ups.beeper.status: disabled
> ups.delay.shutdown: 0
> ups.delay.start: 2
> ups.load: 17.0
> ups.mfr: -------------
> ups.model: ------ VS000361
> ups.serial: unknown
> ups.status: OL
> ups.temperature: 30.0
> ups.type: standby
>
> Dec 28 13:02:46 calculon megatec[17799]: Communications with UPS lost: No status from UPS.
> Dec 28 13:02:47 calculon megatec[17799]: Communications with UPS re-established
> Dec 28 13:05:09 calculon megatec[17799]: Communications with UPS lost: No status from UPS.
> Dec 28 13:05:09 calculon megatec[17799]: Communications with UPS re-established
>
> Thanks!
>
> -- 
> Sincerely yours,
> Yury V. Zaytsev
>
>
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
>



More information about the Nut-upsuser mailing list