This isn't particularly elegant, but something like it should do what you want:<div><br></div><div>   #!/bin/bash</div><div><br></div><div>   TESTHOSTS="<a href="http://www.google.com">www.google.com</a> <a href="http://www.yahoo.com">www.yahoo.com</a> <a href="http://www.microsoft.com">www.microsoft.com</a>"</div>
<div><br></div><div>   for N in $TESTHOSTS</div><div>   do</div><div>     curl -s -S -L -m 10 -o /dev/null http://$N</div><div>     if [ "$?" -eq "0" ]; then</div><div>       # page fetched OK</div><div>
       break</div><div>     fi</div><div>     # Ran out of hosts, must be all broken</div><div>     $BB $BBDISP "status internet.web `date`</div><div>        Cannot reach any common web servers, panic now!!"</div>
<div>     exit 0</div><div>   done</div><div>   # found at least one working offsite server</div><div>   $BB $BBDISP "status internet.web `date`</div><div>      Found at least one working offsite server.  The world is still there."</div>
<div>   exit 0<br><br></div><div><br></div><div>Ralph Mitchell</div><div><br></div><div><br><div class="gmail_quote">On Wed, Aug 5, 2009 at 9:55 AM, Ricardo Stella <span dir="ltr"><<a href="mailto:stella@rider.edu">stella@rider.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Can these be combined as well? Ie do multiple http checks and go red<br>
only if all fail?<br>
<br>
TIA...<br>
<div class="im"><br>
Josh Luthman wrote:<br>
> Might also want to do some HTTP checks.  If your router's NAT table<br>
> has problems, connection limits are hit, etc.  Pretty much anything<br>
> TCP based but doing an HTTP request to Google should satisfy and be easy.<br>
><br>
> Josh Luthman<br>
> Office: 937-552-2340<br>
> Direct: 937-552-2343<br>
> 1100 Wayne St<br>
> Suite 1337<br>
> Troy, OH 45373<br>
><br>
> "When you have eliminated the impossible, that which remains, however<br>
> improbable, must be the truth."<br>
> --- Sir Arthur Conan Doyle<br>
><br>
><br>
> On Wed, Aug 5, 2009 at 10:10 AM, Ricardo Stella <<a href="mailto:stella@rider.edu">stella@rider.edu</a><br>
</div><div class="im">> <mailto:<a href="mailto:stella@rider.edu">stella@rider.edu</a>>> wrote:<br>
><br>
><br>
>     Hello,<br>
><br>
>     We have a request to monitor 'internet' connectivity.  (When it comes<br>
>     from higherups...)<br>
><br>
>     Just pinging up the line might not be good enough as we've had issues<br>
>     with our providers in the recent past.  So I figured ping several well<br>
>     known hosts out in the cloud and if all are out, then we have no<br>
>     'internet'.<br>
><br>
>     I came out with the following.  Seems to work, but figure I run it<br>
>     thru<br>
>     the list in case someone else has done this already...<br>
><br>
>     page internet Internet Connectivity<br>
>     127.0.0.1  INTERNET # conn=ip1,ip2,ip3,ip4,ip5<br>
><br>
><br>
>     TIA...<br>
><br>
>     To unsubscribe from the hobbit list, send an e-mail to<br>
</div>>     <a href="mailto:hobbit-unsubscribe@hswn.dk">hobbit-unsubscribe@hswn.dk</a> <mailto:<a href="mailto:hobbit-unsubscribe@hswn.dk">hobbit-unsubscribe@hswn.dk</a>><br>
<div><div></div><div class="h5">><br>
><br>
><br>
<br>
<br>
To unsubscribe from the hobbit list, send an e-mail to<br>
<a href="mailto:hobbit-unsubscribe@hswn.dk">hobbit-unsubscribe@hswn.dk</a><br>
<br>
<br>
</div></div></blockquote></div><br></div>