Today Ralf Hildebrandt wrote:

> * Ralf Hildebrandt <[EMAIL PROTECTED]>:
> > Is this valid alertee syntax?
> >
> > + Terminalserver
> > menu = Terminalserver
> > title = Terminalserver
> > alerts = reachable,unreachable
> > alertee = [EMAIL PROTECTED],[EMAIL 
> > PROTECTED],|/usr/local/scripts/smokeping-overview.pl
> >
> > meaning, that the alert goes to xxx, yyy and gets piped into the script?
>
> Doesn't work. The list is not being split.
>
this should help

--- Smokeping.pm~       Mon Sep 13 12:39:49 2004
+++ Smokeping.pm        Mon Sep 13 12:47:29 2004
@@ -910,7 +910,7 @@
                         my $rtt = "rtt: ".join ", ",map {defined $_ ? (/^\d/ ? 
sprintf "%.0fms", $_*1000 :$_):"U" } @{$x->{rtt}};
                         my $stamp = scalar localtime time;
                        my @to;
-                       foreach my $addr 
($cfg->{Alerts}{to},$tree->{alertee},$cfg->{Alerts}{$_}{to}){
+                       foreach my $addr (map {split /\s*,\s/, $_} 
$cfg->{Alerts}{to},$tree->{alertee},$cfg->{Alerts}{$_}{to}){
                             next unless $addr;
                             if ( $addr =~ /^\|(.+)/) {
                                 system $1,$_,$line,$loss,$rtt,$tree->{host};
>

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker @ ISG.EE, ETL F24.2, ETH, CH-8092 Zurich
 / // _ \/ _ \/ /  System Manager, Time Lord, Coder, Designer, Coach
/_/ \.__/_.__/_/   http://people.ee.ethz.ch/oetiker +41(0)44-632-5286

--
Unsubscribe mailto:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/smokeping-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

Reply via email to