summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiko Tyni <ntyni@iki.fi>2006-07-09 10:06:42 +0200
committerNiko Tyni <ntyni@iki.fi>2006-07-09 10:06:42 +0200
commit24aad364c78d190bdb371d0f19295cbecfc04ecd (patch)
treee23a2ad04629e3b56a382fb350116d2c7fbc2289
parentbc44b6eb6edf099dbd8f2ba40ce7ed9e03462add (diff)
downloadsmokeping-24aad364c78d190bdb371d0f19295cbecfc04ecd.tar.gz
smokeping-24aad364c78d190bdb371d0f19295cbecfc04ecd.tar.xz
Merge a change from the 2.0 tree.
-rw-r--r--CHANGES4
-rw-r--r--lib/Smokeping.pm5
2 files changed, 7 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 97c8a37..4f56dd6 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
* AnotherDNS.pm: added option 'require_answers' for testing
recursive DNS servers. -- niko
+* brought back the FPing.pm 'timeout' parameter, since it does something
+ after all. -- niko, requested by Peter Klausner <peter.klausner *gmail.com>
+* fix running an external program on edge-triggered alerts.
+ -- niko, from Peter Klausner <peter.klausner *gmail.com>
2006/7/9 -- released version 20060709_trunk
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index 0236772..557f506 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -1169,10 +1169,11 @@ sub update_rrds($$$$$) {
foreach my $addr (map {$_ ? (split /\s*,\s*/,$_) : ()} $cfg->{Alerts}{to},$tree->{alertee},$cfg->{Alerts}{$_}{to}){
next unless $addr;
if ( $addr =~ /^\|(.+)/) {
+ my $cmd = $1;
if ($edgetrigger) {
- system $1,$_,$line,$loss,$rtt,$tree->{host}, ($what =~/raise/);
+ system $cmd,$_,$line,$loss,$rtt,$tree->{host}, ($what =~/raise/);
} else {
- system $1,$_,$line,$loss,$rtt,$tree->{host};
+ system $cmd,$_,$line,$loss,$rtt,$tree->{host};
}
} elsif ( $addr =~ /^snpp:(.+)/ ) {
sendsnpp $1, <<SNPPALERT;