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

Tobias Oetiker tobi at oetiker.ch
Thu Aug 23 22:59:31 CEST 2012


Hi Nicolas,

Today Nicolas KARP wrote:

> Hi Niko,
>
> I don't understand why the patch was not commited to the current version of
> smokeping ?
> 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

please just send me that patch or create a pull request if you are
working on a fork

cheers
tobi

>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the smokeping-users mailing list