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

Niko Tyni ntyni+smokeping-users at mappi.helsinki.fi
Mon May 31 19:37:47 CEST 2010

On Mon, May 31, 2010 at 12:27:44PM +0200, Stian Øvrevåge wrote:

> When using edgetrigger alerts the value of the 6. argument calling the
> script is a "1" indicating a raising of the alarm. In the
> documentation it says that when lowering the alert the value is a 0.
> This is not the behaviour I'm observing; I'm observing the script
> being called with only 5 arguments, and thus causing my script to
> treat the alarm as a normal persistent alarm, and not a lowering of an
> incident that has been in progress.

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.
-------------- 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/20100531/d5a0ff2a/attachment.patch 

More information about the smokeping-users mailing list