<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>So I have a script which monitors 3 ip’s behind an l2l tunnel and I only get a red face if ALL 3 are unreachable. The script looks like so:<o:p></o:p></p><div style='mso-element:para-border-div;border:none;border-bottom:dotted windowtext 3.0pt;padding:0in 0in 1.0pt 0in'><p class=MsoNormal style='border:none;padding:0in'><o:p> </o:p></p></div><p class=MsoNormal>#!/bin/sh<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>BBHTAG=VPN          # What we put in bb-hosts to trigger this test<o:p></o:p></p><p class=MsoNormal>COLUMN=$BBHTAG        # Name of the column, often same as tag in bb-hosts<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>$BBHOME/bin/bbhostgrep $BBHTAG | while read L<o:p></o:p></p><p class=MsoNormal>do<o:p></o:p></p><p class=MsoNormal>   set $L # To get one line of output from bbhostgrep<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>   HOSTIP="$1"<o:p></o:p></p><p class=MsoNormal>   MACHINEDOTS="$2"<o:p></o:p></p><p class=MsoNormal>   MACHINE=`echo $2 | $SED -e's/\./,/g'`<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>   COLOR=green<o:p></o:p></p><p class=MsoNormal>   MSG="$BBHTAG status for host $MACHINEDOTS"<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>#... do the test, perhaps modify COLOR and MSG<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>COLOR=green             # By default, everything is OK<o:p></o:p></p><p class=MsoNormal>MSG="All is OK"<o:p></o:p></p><p class=MsoNormal>HOSTS="172.200.129.226 172.34.55.66 172.202.94.226" <o:p></o:p></p><p class=MsoNormal>PINGCNT=3     # number of times to ping<o:p></o:p></p><p class=MsoNormal>STATUS="bad"<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>for host in $HOSTS<o:p></o:p></p><p class=MsoNormal>do<o:p></o:p></p><p class=MsoNormal>    ping -c $PINGCNT $host<o:p></o:p></p><p class=MsoNormal>    if [[ $? == 0 ]]<o:p></o:p></p><p class=MsoNormal>    then<o:p></o:p></p><p class=MsoNormal>        STATUS="ok"<o:p></o:p></p><p class=MsoNormal>    fi<o:p></o:p></p><p class=MsoNormal>done<o:p></o:p></p><p class=MsoNormal>if [ $STATUS != "ok" ];then<o:p></o:p></p><p class=MsoNormal>    COLOR="red"<o:p></o:p></p><p class=MsoNormal>    MSG="Tunnel is down"<o:p></o:p></p><p class=MsoNormal>fi<o:p></o:p></p><p class=MsoNormal>$BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>${MSG}<o:p></o:p></p><p class=MsoNormal>   "<o:p></o:p></p><p class=MsoNormal>Done<o:p></o:p></p><p class=MsoNormal>****************************************************************************************************<o:p></o:p></p><p class=MsoNormal>The script works fine form most of my tunnels, but some clients don’t allow ping on the network, and on top of that an even better check would be to hit 3 diff sites that are on those ips for the host for example <a href="http://172.66.11.33/hello/imhere.gif">http://172.66.11.33/hello/imhere.gif</a>. Is there a simple way to motify the script above to use these full http host rather than the singular ip?  I see in hobbitlaunch.cfg the bbnet entry which is responsible for the http test looks like this<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>[bbnet]<o:p></o:p></p><p class=MsoNormal>        ENVFILE /home/hobbit/server/etc/hobbitserver.cfg<o:p></o:p></p><p class=MsoNormal>        NEEDS hobbit  <o:p></o:p></p><p class=MsoNormal>        CMD bbtest-net --report --ping --checkresponse --timeout=30<o:p></o:p></p><p class=MsoNormal>        LOGFILE $BBSERVERLOGS/bb-network.log<o:p></o:p></p><p class=MsoNormal>        INTERVAL 5m<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Do I need to make mine look somewhat like this so I can use the bbtest-net cmd within my script instead of just ping? I know its kind of a long wordy question and much help to anyone who can offer insight.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Wesley Knox<o:p></o:p></p><p class=MsoNormal>Systems Administration<o:p></o:p></p><p class=MsoNormal>BT | Retail & Commercial Systems<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>SIEMENS Industry, Inc.<o:p></o:p></p><p class=MsoNormal>7004 Bee Caves Road<o:p></o:p></p><p class=MsoNormal>Building Two, Suite 200 <o:p></o:p></p><p class=MsoNormal>Austin, TX 78746<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>P: 512-306-9400 ext. 255<o:p></o:p></p><p class=MsoNormal>C: 512-364-3720<o:p></o:p></p><p class=MsoNormal>Wesley.knox@siemens.com<o:p></o:p></p><p class=MsoNormal>usa.siemens.com/rcs<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>CONFIDENTIALITY NOTICE: This message, together with any attachments, is intended only for the use of the individual or entity to which it addresses and may contain information that is legally privileged, confidential and exempt from disclosure. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this message, or any attachment, is strictly prohibited. If you have received this message in error, please immediately notify the original sender and delete this message, along with any attachments from your computer.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>