using fping to monitor internet connection status
Paul Hamilton
paulh at bdug.org.au
Sun Jul 9 14:56:15 UTC 2006
> -----Original Message-----
> From: Greg Barniskis [mailto:nalists at scls.lib.wi.us]
> Sent: Thursday, 6 July 2006 11:32 PM
> To: Paul Hamilton
> Cc: freebsd-questions at freebsd.org
> Subject: Re: using fping to monitor internet connection status
>
>
> Paul Hamilton wrote:
> > Hi,
> >
> > I need to monitor a number of IP addresses, so that if they ALL go
> > down (say three IP's), then that is a pretty good
> indication that my
> > server has lost internet connectivity. [snip] Any idea's on a ping
> > tool or simple script?
>
> Your test would be a little simpler if you just test one IP address:
> your ISP's upstream router. Its reachability is quite definitive re:
> whether your ISP link is up or down.
>
> Even it it's assigned dynamically by DHCP, you should be able to
> write a script that pulls that IP, pings it a few times, and checks
> the result. No special tools necessarily required.
>
> --
> Greg Barniskis, Computer Systems Integrator
> South Central Library System (SCLS)
> Library Interchange Network (LINK)
> <gregb at scls.lib.wi.us>, (608) 266-6348
>
>
Hi All,
Thanks for your input. I was hoping there was another cmd/util out there
similar to fping that I could elegantly use. I like the above idea though,
so I ended up using this to isolate the upstream ISP gateway IP:
traceroute -nm 2 <close-by Internet IP> | tail -1 | awk '{ print $2 }'
Integrated that into the fping Perl script and we are away!
Thanks once again :-)
Cheers,
Paul Hamilton
While the cats away - the mice do play!
More information about the freebsd-questions
mailing list