in reply to (jeffa) Re: Ping Monitor with Email Notification
in thread Ping Monitor with Email Notification
I may very well misread your code, but aren't you sending one mail for every failed host too?
I'd expected something like
may I humbly ask what I've overlooked?[...] my @failed = []; foreach my $host (@host) { print "$host is "; unless ($ping->ping($host, $first)) { sleep ($delay); unless ($ping->ping($host, $second)) { push @failed, $host; print 'NOT '; } } print "reachable.\n"; } notify(@failed) if @failed; [...]
regards,
tomte
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) 3Re: Ping Monitor with Email Notification
by jeffa (Bishop) on Feb 13, 2003 at 15:04 UTC | |
by Aristotle (Chancellor) on Feb 13, 2003 at 18:52 UTC | |
by Tomte (Priest) on Feb 13, 2003 at 15:15 UTC | |
|
Re: Re: (jeffa) Re: Ping Monitor with Email Notification
by tachyon (Chancellor) on Feb 13, 2003 at 14:58 UTC |