[smokeping-users] Alerts: Edgetrigger not sending a "0" as argument when lowering alert

Niko Tyni ntyni+smokeping-users at mappi.helsinki.fi
Fri Aug 24 09:33:53 CEST 2012


On Thu, Aug 23, 2012 at 10:59:31PM +0200, Tobias Oetiker wrote:
> Today Nicolas KARP wrote:

> > I don't understand why the patch was not commited to the current version of
> > smokeping ?

Looks like I forgot about it. Sorry about that, I'm not doing much with
SmokePing nowadays.

> > I'm running the smokeping version 2.6.7 and i still not receive a 0 when
> > the alarm is lowered and when i used the argument "edgetrigger".
> > It would be great if we can dissociate a alarm which is cleared if we use
> > edgetrigger (6 args, last arg = 0) and a alarm which is raised if se don't
> > use edgetrigger (5 args).
> >
> > We will have 3 cases :
> >
> > edgetrigger :
> > 6 args and last arg = 1 : Alarm is raised
> > 6 args and last arg = 0 : Alarm is cleared
> >
> > no edgetrigger
> > 5 args : Alarm is always raised
> >
> > BTW, i applied your patch and it works perfectly.
> >
> > What do you think ?
> >
> > Best Regards,
> >
> > This indeed seems to be a bug. Thanks for reporting it.
> >
> > Looking at the code, the lower edge will call your script with six
> > arguments, but the last one is an empty string instead of zero. There is a
> > difference to the five argument case, and it should be possible to detect
> > this in your script (for Bourne shell scripts, looking at $# should do.)
> >
> > That said, does this patch work for you? It should make the behaviour
> > conform to the documentation.
> 
> that patch seems to have passed me by ... cant find any
> pullrequests on https://github.com/oetiker/SmokePing

Found it in my mailbox from May 2010, attached. Tobi, feel free
to pick this up.

Sorry for dropping the ball on this.
-- 
Niko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: edgetrigger.patch
Type: text/x-diff
Size: 694 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/smokeping-users/attachments/20120824/6522c63c/attachment.patch 


More information about the smokeping-users mailing list