diff options
Diffstat (limited to 'lib/Smokeping.pm')
-rw-r--r-- | lib/Smokeping.pm | 5 |
1 files changed, 3 insertions, 2 deletions
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; |