[Nut-upsuser] Help with Elite 800VA usb UPS
Roger Price
roger at rogerprice.org
Mon Jul 3 14:39:00 UTC 2017
On Mon, 3 Jul 2017, Andrea de Lutti wrote:
> MONITOR dummy at artu 1 user pass master
> SHUTDOWNCMD "/sbin/shutdown -h +0"
> NOTIFYCMD /usr/local/bin/upssched-script
Hi, As far as I can see, what you are getting in syslog corresponds
correctly to what you have specified. You have specified that upsmon is
to call upssched-script _directly_. This means that the argument to the
script call will be the NOTIFYMSG value. But in upssched-script you are
testing for the notifytype, e.g. ONBATT.
Did you want that, or did you want NOTIFYCMD to point to upssched?
If I may throw away modesty, see chapter 4 in
http://rogerprice.org/NUT/ConfigExamples.A5.pdf which has a diagram and a
fully worked example.
Roger
> NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC
> NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC
> NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC
...
> # Network UPS Tools - upssched.conf sample file
> #
> # ============================================================================
> CMDSCRIPT /usr/local/bin/upssched-script
> PIPEFN /var/run/nut/upssched/upssched.pipe
> LOCKFN /var/run/nut/upssched/upssched.lock
>
> AT ONBATT * EXECUTE onbattwarn
> AT ONLINE * EXECUTE ups-back-on-power
>
> The upssched-script is
>
> #! /bin/sh
> case "$1" in
> "ONBATT")
> echo "On batt" | mailx -v -r "adelutti at gmail.com" -s "TEST NUT object" -S smtp="smtp.gmail.com:587" -S smtp-use-starttls -S smtp-auth=login -S
> smtp-auth-user="adelutti at gmail.com" -S smtp-auth-password="gtmtnqyelhlumyds" -S ssl-verify=ignore adelutti+server at gmail.com
> ;;
.......
> *)
> logger -t upssched-cmd "Unrecognized command: $1"
> ;;
> esac
>
> while upssched.conf is
>
> Running upson in debug mode I can see the change of the status (I have a cycle of 30 secs for online/batterry/low battery) but the syslog reports
>
> Jul 3 16:17:15 artu upsmon[4685]: UPS dummy at artu on battery
> Jul 3 16:17:15 artu upssched-cmd: Unrecognized command: UPS dummy at artu on battery
More information about the Nut-upsuser
mailing list