summaryrefslogtreecommitdiffstats
path: root/lib/Smokeping.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Smokeping.pm')
-rw-r--r--lib/Smokeping.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index 49fdea8..9ff2578 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -1142,6 +1142,12 @@ sub update_rrds($$$$$) {
next;
};
my $prevmatch = $tree->{prevmatch}{$_} || 0;
+
+ # 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.
+ $x->{prevmatch} = $prevmatch;
+
my $match = &{$cfg->{Alerts}{$_}{sub}}($x) || 0; # Avgratio returns undef
my $edgetrigger = $cfg->{Alerts}{$_}{edgetrigger} eq 'yes';
my $what;