Displaying 20 results from an estimated 44 matches for "notifytyp".
Did you mean:
notifytype
2010 Jan 09
2
problem with mailing (nut 2.4.1 and a powermust650 -> megatec_usb)
...00
NOCOMMWARNTIME 300
INALDELAY 5
the /root/upsmailer is just a simple shell script that mails the events,
it looks like:
#!/bin/bash
RECIPIENT="controller at xxx"
SCRIPTNAME=`basename $0`
[ `echo $UPSNAME | wc -w` -eq "0" ] && UPSNAME="unknown"
[ `echo $NOTIFYTYPE | wc -w` -eq "0" ] && NOTIFYTYPE="unknown"
echo "$*" | mailx -s "$SCRIPTNAME: $UPSNAME $NOTIFYTYPE" $RECIPIENT
exit 0
When i disconnect the UPS from the power line, i get a message in my
syslog but not on the wall and the script isn't started e...
2017 Jul 05
2
Clarification to man upssched.conf
I would like to add a sentence to the man page for upssched.conf.
After the sentence
"Note that any AT that matches both the notifytype and the upsname for the
current event will be used."
I propose adding the sentence
"If more than one AT matches the notifytype and upsname, the AT
declarations are executed in the order in which they appear in
upssched.conf.
This is the current behaviour so there is nothing to do t...
2016 Oct 06
2
NOTIFYCMD doesn't work at all... not fully
...ify.sh"
Now this ist my "/etc/nut/upsnotify.sh":
#!/bin/bash
EMAIL='mail at domain.de'
SMS1='+49123456789'
SMS2='+491987654231'
#eMail versenden
echo -e "Die USV mit dem Namen '$UPSNAME' hat seinen Status ge?ndert!\n\nAktueller Status: '$NOTIFYTYPE'\n\nam `date +%d.%m.%Y` um `date +%H:%M` Uhr" |mail -s "[USV: $UPSNAME][STATUS] $NOTIFYTYPE am `date +%d.%m.%Y` um `date +%H:%M` Uhr" $EMAIL
#SMS versenden
echo -e "Die USV mit dem Namen '$UPSNAME' hat seinen Status ge?ndert!\n\nAktueller Status: '$NOTIFYTYPE&...
2008 Sep 17
0
FW: Setup of upssched on opensuse 11 - examined pipefn ad lockfm
...ly
# the same time. This file will only exist briefly. It must not be
# created by any other process.
#
# You should put this in the same directory as PIPEFN.
#
LOCKFN /var/lib/ups/upssched/upssched.lock
#
============================================================================
#
# AT <notifytype> <upsname> <command>
#
# Define a handler for a specific event <notifytype> on UPS <upsname>.
#
# <upsname> can be the special value * to apply this handler to every
# possible value of <upsname>.
#
# Run the command <command> via your CMDSCRIPT...
2014 Sep 04
0
howto force shutdown if nut-snmp Communications lost
...1. suggestion was option DEADTIME, but seem to be information only. (s. below)
DEADTIME expiration is a critical condition if the UPS is on battery when comms are lost, otherwise you are correct, it is only informative.
What about a NOTIFYCMD script that checks for COMMBAD or NOCOMM? (passed in $NOTIFYTYPE) You will also need to set the EXEC flag on that event.
--
Charles Lepple
clepple at gmail
2017 Jul 11
0
Clarification to man upssched.conf
On July 5, 2017 9:55:13 AM GMT+02:00, Roger Price <roger at rogerprice.org> wrote:
>I would like to add a sentence to the man page for upssched.conf.
>
>After the sentence
>
>"Note that any AT that matches both the notifytype and the upsname for
>the
>current event will be used."
>
>I propose adding the sentence
>
>"If more than one AT matches the notifytype and upsname, the AT
>declarations are executed in the order in which they appear in
>upssched.conf.
>
>This is the curre...
2017 Jun 26
0
Help with Elite 800VA usb UPS
...WALL+EXEC
NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC
NOTIFYFLAG REPLBATT SYSLOG+WALL+EXEC
NOTIFYFLAG NOCOMM SYSLOG+WALL+EXEC
NOTIFYFLAG NOPARENT SYSLOG+WALL+EXEC
and enabled my email script:
NOTIFYCMD /root/mailnotify.sh
This is my working script:
#!/bin/sh
echo "$UPSNAME in is $NOTIFYTYPE state" | mailx -v -r "adelutti at gmail.com"
-s "$NOTIFYTYPE" -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="mypassword" -S ssl-verify=ignore
adelutti+serve...
2017 Nov 01
1
Email Alerts for Multiple UPSs with upssched
This was the secret sauce! I first modified my BASH script to stuff the output of the 'set' command into a variable, then passed that variable in to my email command. Then I triggered an event and saw what variables were there in the body of the message.
Voila!
$UPSNAME and $NOTIFYTYPE were there and available. I modified the script to pump THOSE into the mail command, and the problem is (at least partially) solved.
The next challenge is going to be sorting out which UPS is being seen on which USB port.
Thanks everyone!!
GMH
-----Original Message-----
From: Jim Klimov [mail...
2016 Oct 05
2
UPS Shutdown
...f that the arrangement can work. As it's naturally impossible for a turned-off computer to send any command anywhere, an option for sending a "take-this-now-but act-on-it-later" command surely must exist.
I'll be initiating my own shutdown sequence as a result of NOTIFYCMD with a NOTIFYTYPE of ONBATT. My process will poll battery status for five minutes (to reduce false positives) before finally deciding to send individual shutdown commands to the server, NAS, other devices, etc. In other words, I'm going to write my own upssched, suited specifically to my platform and configurat...
2017 Jul 12
1
Clarification to man upssched.conf
On Tue, 11 Jul 2017, Jim Klimov wrote:
> On July 5, 2017 9:55:13 AM GMT+02:00, Roger Price <roger at rogerprice.org> wrote:
>> I propose adding the sentence
>>
>> "If more than one AT matches the notifytype and upsname, the AT
>> declarations are executed in the order in which they appear in
>> upssched.conf.
>
> Your proposal and reasoning make sense to me :)
>
> I wonder if it would be more valuable and visible if such "direct
> change" suggestions were added a...
2017 May 11
2
Good Day NUT
Good Day nut
Many thanks for your reading
==> AA. I confront an issue that can't shutdown the ups
With the nut, I can get the ups status(upsc) and shutdown the linux-ubuntu when power failure occurs(upsmon)
But don't know which configuration I ignore to setup for ups shutdown
==> BB. I want to check that with the command "upsdrvctl shutdown" and
2014 Sep 03
2
howto force shutdown if nut-snmp Communications lost
Hallo,
I have one ups with snmp and any ups without snmp.
Shutdown works while network online.
But some batteries are empty, so that the communication break early.
Howto force shutdown if nut-snmp Communications lost?
My 1. suggestion was option DEADTIME, but seem to be information only. (s. below)
Any suggestions?
The last way would be a ugly cronjob (like: ping || shutdown).
regards Heiko
2017 Jun 16
3
Help with Elite 800VA usb UPS
Thanks mates,
as suggested I have added
runtimecal = 240,100,720,50
default.battery.voltage.low = 10.4
default.battery.voltage.high = 13.8 (the actual charging voltage)
In ups.conf
I have also added the startup procedure in rc.local file, everything is
fine...
I have only to make a deep test.
Is there a way to add a NOTIFYMSG value for the battery test?
Thank you lots
Andrea
2017 Jul 03
2
Help with Elite 800VA usb UPS
Ok, I am running NUT in dummy mode.
I have added a new ups in ups.conf
[dummy]
driver = dummy-ups
port = upsc.dev
desc = "dummy ups for testing purposes"
upsc.dev has been generated by exporting the Elit configuration.
I have added the monitor line in upsmon.conf and the "exec" flags (all the
events)
MONITOR dummy at artu 1 user pass master
SHUTDOWNCMD
2017 May 15
1
Fw: [Nut-upsdev] POWERCOM-UPS-USB : UPS Shutdown
...es file
.../scripts/systemd/nutshutdown . Does Ubunti install this?
> 5. File = notifycmd
> #!/bin/bash
> #
> # NUT NOTIFYCMD script
> PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin
> trap "exit 0" SIGTERM
> if [ "$NOTIFYTYPE" = "ONLINE" ]
> then
> echo $0: power restored | wall
Does wall successfully notify the users on an Ubuntu system? If you type
echo "Hello from wall" | wall
do the users of Gnome, KDE, LXDE, LightDM etc see the message?
> ??? fi??? 6. File =u...
2017 Jun 09
2
Apple Mac slave
On Thu, 8 Jun 2017, Robbie van der Walle wrote:
> After the first test and the NAS is restarted I had to change the
> setting battery.charge.low again to 80?
Does the NAS DSM reset battery.charge.low to 10 or is it internal to the
UPS? You will have to experiment by disconnecting the UPS control lead
from the NAS and connecting it (if possible) to the Mac. After setting to
80 and a
2020 Nov 07
3
upsd "events"
Hello,
I'm quite new to NUT, currently setting it up on a few machines in my home
lab because I switched from an APC UPS to a CyberPower unit. This is
running in a home lab, and I'm trying to implement some apparently unusual
logic around load-shedding. I'm strongly considering writing my own custom
script to replace upsmon in order to achieve the desired result.
I see a lot of
2016 Apr 26
0
[PATCH] upsmon: Add NOTIFYMSG to env of NOTIFYCMD
...to upssched is not passed through when it
calls CMDSCRIPT.
--- upsmon.c 2016-04-25 20:17:44.392925130 -0600
+++ upsmon.c+ 2016-04-25 20:18:21.512871526 -0600
@@ -151,6 +151,7 @@
setenv("UPSNAME", "", 1);
setenv("NOTIFYTYPE", ntype, 1);
+ setenv("NOTIFYMSG", notice, 1);
if (system(exec) == -1) {
upslog_with_errno(LOG_ERR, "%s", __func__);
}
2016 Oct 06
0
UPS Shutdown
...possible for a turned-off computer to send any command
> anywhere, an option for sending a ?take-this-now-but act-on-it-later?
> command surely must exist.
The command is "upsdrvctl shutdown".
> I?ll be initiating my own shutdown sequence as a result of NOTIFYCMD
> with a NOTIFYTYPE of ONBATT. My process will poll battery status for
> five minutes (to reduce false positives) before finally deciding to send
> individual shutdown commands to the server, NAS, other devices, etc. In
> other words, I?m going to write my own upssched, suited specifically to
> my pla...
2017 Jul 03
0
Help with Elite 800VA usb UPS
...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...