<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-04-04 14:18 GMT+02:00 Jon Bendtsen <span dir="ltr"><<a href="mailto:jon.bendtsen@jonix.dk" target="_blank">jon.bendtsen@jonix.dk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 04/04/17 14.10, Roger Price wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On Tue, 4 Apr 2017, Arnaud Quette wrote:<br>
<br>
</blockquote>
<br></span>
[cuuuuut]<span class="gmail-"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi Arnaud, It seems to me that, looking out into the future, there are three<br>
things upsmon needs:<br>
<br>
1. A fall-through <notify type> of "UNKNOWN" so that all status changes, no<br>
matter how wierd, can be caught.  Such a catch-all <notify type> would also have<br>
caught the "ALARM" from the old battery.<br>
<br>
2. A UPS specific option in the NOTIFYFLAG and NOTIFYMSG declarations as already<br>
provided by the AT declaration in upssched.conf.  This would make it possible to<br>
have messages and action specific to a UPS, in a multi-UPS configuration.<br>
<br>
I would like to be able to specify<br>
<br>
   NOTIFYMSG myups@localhost      ONBATT "%s: local UPS on battery"<br>
   NOTIFYMSG bigups@server        ONBATT "%s: Server room alert: UPS on battery"<br>
<br>
   NOTIFYFLAG myups@localhost     ONBATT SYSLOG+EXEC+WALL<br>
   NOTIFYFLAG heartbeat@localhost ONBATT SYSLOG+EXEC<br>
<br>
3. A <notify type> "ALARM" as you propose.<br>
</blockquote>
<br></span>
good ideas<br></blockquote></div><br></div><div class="gmail_extra">there is a Github issue: <a href="https://github.com/networkupstools/nut/issues/415">https://github.com/networkupstools/nut/issues/415</a><br></div><div class="gmail_extra">+ a branch with the implementation: <a href="https://github.com/networkupstools/nut/tree/upsmon_alarm">https://github.com/networkupstools/nut/tree/upsmon_alarm</a></div><div class="gmail_extra"><br clear="all"></div><div class="gmail_extra">For now:<br></div><div class="gmail_extra">- upsmon can react on the ALARM notify type, as with other events, and WALL+SYSLOG+EXEC...<br></div><div class="gmail_extra">- I've also fixed the CGI to expose the ALARM flag, which was not done.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">A possible improvement would be to send the content of ups.alarm, but that requires more thinking and time.<br></div><div class="gmail_extra">And the current implementation already points at this data.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">@Jon: would you be able to test this branch and ack? (including the "covers (or not) my needs...)<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">thanks and cheers,<br></div><div class="gmail_extra">Arno<br></div><div class="gmail_extra">-- <br><div class="gmail_signature">Eaton Data Center Automation Solutions - Opensource Leader - <a href="http://42ity.org" target="_blank">http://42ity.org</a><br>NUT (Network UPS Tools) Project Leader - <a href="http://www.networkupstools.org" target="_blank">http://www.networkupstools.org</a><br>Debian Developer - <a href="http://www.debian.org" target="_blank">http://www.debian.org</a><br>Free Software Developer - <a href="http://arnaud.quette.fr" target="_blank">http://arnaud.quette.fr</a><br></div>
</div></div>