[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: Router appears in tracert but can't ping?



hi just a small draft to start if you have web server installed :)
#!/usr/bin/perl

#====================================

my $host="http://www.myhost.net";;
my $gsm='123435555';
my $emaildomain='partner-site.com';
my $emailbox='emergency';
my $gsm_carrier='your_mobile_suffix.com';

#====================================
use LWP::Simple;
if(!head($host)){
$gsm_email = $gsm.'@'.$gsm_carrier;
$to_email=$emailbox.'@'.$emaildomain;
$from_email='guard@'.$emaildomain;
open   MAIL, "| /usr/sbin/sendmail -t -i" or die "Can't init sendmail : $!";
print  MAIL "To: $gsm_email\n";
print  MAIL "From: $from_email\n";
print  MAIL "Subject: Website Failure. Host: $host!\n";
print  MAIL "Could NOT connect to $host\n";
close  MAIL;
open   MAIL, "| /usr/sbin/sendmail -t -i" or die "Can't init sendmail : $!";
print  MAIL "To: $to_email\n";
print  MAIL "From: $from_email\n";
print  MAIL "Subject: Website Failure. Host: $host!\n";
print  MAIL "Could NOT connect to $host\n";
close  MAIL;
}

Kind regards,

Peter Zyumbilev

Web Developer & Administrator
BIVOL BULGARIA
email: bivol@bivol.net <mailto:bivol@bivol.net>
web: http://www.bivol.net <http://www.bivol.net>
tel.: +359 88 966940


> -----Original Message-----
> From: Rico -mc- Gloeckner [mailto:debian-ml@ukeer.de]
> Sent: Tuesday, June 17, 2003 4:01 PM
> To: Stefan Neufeind
> Cc: debian-isp@lists.debian.org; Russell Coker
> Subject: Re: Router appears in tracert but can't ping?
>
>
> On Tue, Jun 17, 2003 at 01:27:16PM +0200, Stefan Neufeind wrote:
> > hosts via ping. So I need a replacement that would tell me if
> this router on
> > the way to a server is reachable. I want to test the whole path
> to see where an
> > error occured. Well, is it possible to "simulate"
> traceroute-like packets? What
> > would you do to achive this?
>
> write a small perl script which execs traceroute and parses traceroute
> data.
>
> shouldnt be too hard.
> --
> | Rico -mc- Gloeckner  |  mv ~/.signature `finger mc@ukeer.de` |
> |  Encrypted Mails preferred:                   1024D/61F05B8C |
> |          3D67 D42F 2D50 4B68 1D62   E999 EFCB CDFF 61F0 5B8C |
>
>
> --
> To UNSUBSCRIBE, email to debian-isp-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmaster@lists.debian.org
>
>



Reply to: