[smokeping-users] Smokeping patch: pass prevmatch state to alert matchers?

Dylan Vanderhoof DylanV at semaphore.com
Mon Jul 10 23:22:54 MEST 2006

Any chance of getting this one-line patch in smokeping?

diff -ur smokeping/lib/Smokeping.pm smokeping-2.0.8/lib/Smokeping.pm
--- smokeping/lib/Smokeping.pm  2006-07-10 09:32:53.000000000 -0700
+++ smokeping-2.0.8/lib/Smokeping.pm    2006-04-14 03:38:39.000000000
@@ -1124,7 +1124,6 @@
                     my $prevmatch = $tree->{prevmatch}{$_} || 0;
-                   $x->{prevmatch} = $prevmatch;
                     my $match = &{$cfg->{Alerts}{$_}{sub}}($x) || 0; #
Avgratio returns undef
                     my $edgetrigger = $cfg->{Alerts}{$_}{edgetrigger}
eq 'yes';
                     my $what;

All it does is add the current state of an edge triggered alert to the
data passed into a matcher, which allows for somewhat more intelligent
alerting due to state awareness.  It should not have any bearing on
existing matchers (unless they're doing a keys() on $data, which I can't
figure out why somebody would want to)

-Dylan Vanderhoof
Semaphore Corporation

Unsubscribe mailto:smokeping-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:smokeping-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/smokeping-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

More information about the smokeping-users mailing list