[smokeping-users] Alerts: Edgetrigger not sending a "0" as argument when lowering alert
Nicolas KARP
liste at karp.fr
Thu Aug 23 17:31:36 CEST 2012
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.
--
Niko
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
# - - Nicolas KARP
# - - Network and Security Engineer
# - - Email : liste at karp.fr <nicolas at karp.fr>
# - - Linkedin : http://www.linkedin.com/pub/nicolas-karp/39/60b/21a
<http://www.linkedin.com/pub/nicolas-karp/39/60b/21a%20>
# - - Viadeo : http://www.viadeo.com/fr/profile/nicolas.karp
<http://www.viadeo.com/fr/profile/nicolas.karp%20>
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/smokeping-users/attachments/20120823/8ddcc90f/attachment.htm
More information about the smokeping-users
mailing list