Xymon Mailing List Archive search

Monitoring "internet"

9 messages in this thread

list Ricardo Stella · Wed, 05 Aug 2009 10:10:50 -0400 ·
Hello,

We have a request to monitor 'internet' connectivity.  (When it comes
from higherups...)

Just pinging up the line might not be good enough as we've had issues
with our providers in the recent past.  So I figured ping several well
known hosts out in the cloud and if all are out, then we have no 'internet'.

I came out with the following.  Seems to work, but figure I run it thru
the list in case someone else has done this already...

page internet Internet Connectivity
127.0.0.1  INTERNET # conn=ip1,ip2,ip3,ip4,ip5


TIA...
list Josh Luthman · Wed, 5 Aug 2009 10:20:32 -0400 ·
Might also want to do some HTTP checks.  If your router's NAT table has
problems, connection limits are hit, etc.  Pretty much anything TCP based
but doing an HTTP request to Google should satisfy and be easy.

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

"When you have eliminated the impossible, that which remains, however
improbable, must be the truth."
--- Sir Arthur Conan Doyle
quoted from Ricardo Stella


On Wed, Aug 5, 2009 at 10:10 AM, Ricardo Stella <user-a9f2fdfdbc44@xymon.invalid> wrote:
Hello,

We have a request to monitor 'internet' connectivity.  (When it comes
from higherups...)

Just pinging up the line might not be good enough as we've had issues
with our providers in the recent past.  So I figured ping several well
known hosts out in the cloud and if all are out, then we have no
'internet'.

I came out with the following.  Seems to work, but figure I run it thru
the list in case someone else has done this already...

page internet Internet Connectivity
127.0.0.1  INTERNET # conn=ip1,ip2,ip3,ip4,ip5


TIA...

list Ricardo Stella · Wed, 05 Aug 2009 10:55:01 -0400 ·
Can these be combined as well? Ie do multiple http checks and go red
only if all fail?

TIA...
quoted from Josh Luthman

Josh Luthman wrote:
Might also want to do some HTTP checks.  If your router's NAT table
has problems, connection limits are hit, etc.  Pretty much anything
TCP based but doing an HTTP request to Google should satisfy and be easy.

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

"When you have eliminated the impossible, that which remains, however
improbable, must be the truth."
--- Sir Arthur Conan Doyle


On Wed, Aug 5, 2009 at 10:10 AM, Ricardo Stella <user-a9f2fdfdbc44@xymon.invalid
<mailto:user-a9f2fdfdbc44@xymon.invalid>> wrote:


    Hello,

    We have a request to monitor 'internet' connectivity.  (When it comes
    from higherups...)

    Just pinging up the line might not be good enough as we've had issues
    with our providers in the recent past.  So I figured ping several well
    known hosts out in the cloud and if all are out, then we have no
    'internet'.

    I came out with the following.  Seems to work, but figure I run it
    thru
    the list in case someone else has done this already...

    page internet Internet Connectivity
    127.0.0.1  INTERNET # conn=ip1,ip2,ip3,ip4,ip5


    TIA...

list Josh Luthman · Wed, 5 Aug 2009 11:01:57 -0400 ·
Not to my knowledge, but I've never read the man page looking for that
method.
quoted from Ricardo Stella

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

"When you have eliminated the impossible, that which remains, however
improbable, must be the truth."
--- Sir Arthur Conan Doyle


On Wed, Aug 5, 2009 at 10:55 AM, Ricardo Stella <user-a9f2fdfdbc44@xymon.invalid> wrote:
Can these be combined as well? Ie do multiple http checks and go red
only if all fail?

TIA...

Josh Luthman wrote:
Might also want to do some HTTP checks.  If your router's NAT table
has problems, connection limits are hit, etc.  Pretty much anything
TCP based but doing an HTTP request to Google should satisfy and be easy.

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

"When you have eliminated the impossible, that which remains, however
improbable, must be the truth."
--- Sir Arthur Conan Doyle


On Wed, Aug 5, 2009 at 10:10 AM, Ricardo Stella <user-a9f2fdfdbc44@xymon.invalid
<mailto:user-a9f2fdfdbc44@xymon.invalid>> wrote:


    Hello,

    We have a request to monitor 'internet' connectivity.  (When it comes
    from higherups...)

    Just pinging up the line might not be good enough as we've had issues
    with our providers in the recent past.  So I figured ping several
well
    known hosts out in the cloud and if all are out, then we have no
    'internet'.

    I came out with the following.  Seems to work, but figure I run it
    thru
    the list in case someone else has done this already...

    page internet Internet Connectivity
    127.0.0.1  INTERNET # conn=ip1,ip2,ip3,ip4,ip5


    TIA...

list Alan Sparks · Wed, 05 Aug 2009 09:36:25 -0600 ·
quoted from Josh Luthman
Josh Luthman wrote:
Not to my knowledge, but I've never read the man page looking for that
method.

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

"When you have eliminated the impossible, that which remains, however
improbable, must be the truth."
--- Sir Arthur Conan Doyle


On Wed, Aug 5, 2009 at 10:55 AM, Ricardo Stella <user-a9f2fdfdbc44@xymon.invalid
<mailto:user-a9f2fdfdbc44@xymon.invalid>> wrote:

    Can these be combined as well? Ie do multiple http checks and go red
    only if all fail?

    TIA...

    Josh Luthman wrote:
Might also want to do some HTTP checks.  If your router's NAT table
has problems, connection limits are hit, etc.  Pretty much anything
TCP based but doing an HTTP request to Google should satisfy and
    be easy.

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

"When you have eliminated the impossible, that which remains,
    however
improbable, must be the truth."
--- Sir Arthur Conan Doyle


On Wed, Aug 5, 2009 at 10:10 AM, Ricardo Stella
    <user-a9f2fdfdbc44@xymon.invalid <mailto:user-a9f2fdfdbc44@xymon.invalid>
<mailto:user-a9f2fdfdbc44@xymon.invalid <mailto:user-a9f2fdfdbc44@xymon.invalid>>> wrote:


    Hello,

    We have a request to monitor 'internet' connectivity.  (When
    it comes
    from higherups...)

    Just pinging up the line might not be good enough as we've
    had issues
    with our providers in the recent past.  So I figured ping
    several well
    known hosts out in the cloud and if all are out, then we have no
    'internet'.

    I came out with the following.  Seems to work, but figure I
    run it
    thru
    the list in case someone else has done this already...

    page internet Internet Connectivity
    127.0.0.1  INTERNET # conn=ip1,ip2,ip3,ip4,ip5


    TIA...

    
You might be able to fake it to enough satisfaction... using a combo
test.  You might want to put the tests on a separate page, maybe explore
the NOPROPRED options.  Make sure that the individual tests don't
trigger alarms.  set up a combo test to go red if the tests all go red,
and set off an alert.  Just a thought.
-Alan
list Francesco Duranti · Wed, 5 Aug 2009 17:41:15 +0200 ·
You can use the bbcombotest to merge the result of all your http content/status check in a single check. 
in bbcombotest.cfg you can put something like:

internet.connect = internet.cont1 && internet.cont2 && internet.cont3

remember to change the hobbitlaunch.cfg to include the launch of bbcombotest 


Francesco
quoted from Ricardo Stella


-----Original Message-----
From: Ricardo Stella [mailto:user-a9f2fdfdbc44@xymon.invalid] 
Sent: mercoledì 5 agosto 2009 16.55
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Monitoring "internet"

Can these be combined as well? Ie do multiple http checks and go red
only if all fail?

TIA...

Josh Luthman wrote:
Might also want to do some HTTP checks.  If your router's NAT table
has problems, connection limits are hit, etc.  Pretty much anything
TCP based but doing an HTTP request to Google should satisfy and be easy.

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

"When you have eliminated the impossible, that which remains, however
improbable, must be the truth."
--- Sir Arthur Conan Doyle


On Wed, Aug 5, 2009 at 10:10 AM, Ricardo Stella <user-a9f2fdfdbc44@xymon.invalid
<mailto:user-a9f2fdfdbc44@xymon.invalid>> wrote:


    Hello,

    We have a request to monitor 'internet' connectivity.  (When it comes
    from higherups...)

    Just pinging up the line might not be good enough as we've had issues
    with our providers in the recent past.  So I figured ping several well
    known hosts out in the cloud and if all are out, then we have no
    'internet'.

    I came out with the following.  Seems to work, but figure I run it
    thru
    the list in case someone else has done this already...

    page internet Internet Connectivity
    127.0.0.1  INTERNET # conn=ip1,ip2,ip3,ip4,ip5


    TIA...

list Harold J. Ballinger · Wed, 5 Aug 2009 11:57:50 -0400 ·
I have a custom EXT that we use for a test called "web" that does this. It isn't efficient coding, but it is down and dirty and it works. (For Example, I didn't use variables in a lot of places where I should to make it portable, etc.)

It uses 4 components:


-          WebChk.bat - Run from BBNT client externals (script could be modified for BBWIN)

-          WebChk.lst - Is a list of websites to be checked

-          Wwwget.bat - Is run by WebChk.bat to test each server in WebChk.lst

-          wget.exe - tool that does the actual testing

It produces output on the Hobbit monitor that looks like:

Wed 08/05/2009 11:53:26.39
.
[cid:image002.gif at 01CA15C4.2CBB0DB0] Wed 08/05/2009 11:53:25.34
.
--11:53:25--  http://www.google.com:80/
           => `index.html'
Connecting to www.google.com:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

    0K -> ....

11:53:25 (4.73 MB/s) - `index.html' saved [4957]

.
.
[cid:image002.gif at 01CA15C4.2CBB0DB0] Wed 08/05/2009 11:53:25.85
.
--11:53:25--  http://www.heritage-healthcare.com:80/
           => `index.html.1'
Connecting to www.heritage-healthcare.com:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 4,142 [text/html]

    0K -> ....                                                   [100%]

11:53:26 (3.95 MB/s) - `index.html.1' saved [4142/4142]

.
.
[cid:image002.gif at 01CA15C4.2CBB0DB0] Wed 08/05/2009 11:53:26.39
.
--11:53:26--  http://www.yahoo.com:80/
           => `index.html.2'
Connecting to www.yahoo.com:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 9,490 [text/html]

    0K -> .........                                              [100%]

11:53:26 (9.05 MB/s) - `index.html.2' saved [9490/9490]

.


There is a WebChk.bat that has:
REM Cleanup
md c:\webtemp
c:
cd \webtemp
Del "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-lastrun.txt"
del "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-Results"
del "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-Status"
del "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-Bad"

REM Run Tests
for /F %%i in (d:\scripts\ext\WebChk.lst) do call "d:\scripts\ext\wwwget.bat" %%i

REM Merge
if exist "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-Bad" goto bad

:good
echo green %date% %time% > "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\logs\web"
type "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-lastrun.txt" >> "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\logs\web"
goto end

:bad
type "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-Bad" >> "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\logs\web"
type "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-lastrun.txt" >> "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\logs\web"

:end
del c:\webtemp\*.* /q

There is a wwwget.bat that has:

REM Run wget > WebChk-Results

d:\scripts\ext\wget %1 -o "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-Results"
echo . >> "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-Results"

REM Check errorlevel for WebChk-Status
if errorlevel 1 goto bad

:good
echo GOOD
echo . > "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-Status"
echo ^&green %date% %time% >> "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-Status"
echo . >> "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-Status"
goto merge

:bad
if exist "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-Bad" goto bigbad
echo ^&yellow %date% %time% > "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-Bad"
goto wolf

:bigbad
echo red %date% %time% > "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-Bad"

:wolf
set errorlevel 0
echo . > "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-Status"
echo ^&yellow %date% %time% >> "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-Status"
echo . >> "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-Status"

REM Merge WebChk-Status and WebChk-Results into WebChk-lastrun.txt
:merge
type "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-Status" >> "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-lastrun.txt"
type "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-Results" >> "C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\tmp\WebChk-lastrun.txt"

The WebChk.lst looks like:
www.google.com
www.mydomain.com
www.yahoo.com

The wget.exe was downloaded online and a version is available at http://users.ugent.be/~bpuype/wget/

If you would like, I could provide a ZIP of all components. I hadn't shared it yet because I know that it is dirty and would be hard to port since I had not used variables for the paths.

• Harold Ballinger
IT Manager
Heritage Healthcare, Inc.
 (XXX) XXX-XXXX  | helpdesk
 (XXX) XXX-XXXX  | office
 (XXX) XXX-XXXX  | fax

[cid:image001.jpg at 01CA15C3.06609780]

Visit our website: www.heritage-healthcare.com<http://www.heritage-healthcare.com/>;
quoted from Josh Luthman


From: Josh Luthman [mailto:user-4c45a83f15cb@xymon.invalid]
Sent: Wednesday, August 05, 2009 10:21 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Monitoring "internet"

Might also want to do some HTTP checks.  If your router's NAT table has problems, connection limits are hit, etc.  Pretty much anything TCP based but doing an HTTP request to Google should satisfy and be easy.

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

"When you have eliminated the impossible, that which remains, however improbable, must be the truth."
--- Sir Arthur Conan Doyle

On Wed, Aug 5, 2009 at 10:10 AM, Ricardo Stella <user-a9f2fdfdbc44@xymon.invalid<mailto:user-a9f2fdfdbc44@xymon.invalid>> wrote:

Hello,

We have a request to monitor 'internet' connectivity.  (When it comes
from higherups...)

Just pinging up the line might not be good enough as we've had issues
with our providers in the recent past.  So I figured ping several well
known hosts out in the cloud and if all are out, then we have no 'internet'.

I came out with the following.  Seems to work, but figure I run it thru
the list in case someone else has done this already...

page internet Internet Connectivity
127.0.0.1  INTERNET # conn=ip1,ip2,ip3,ip4,ip5


TIA...
list Ralph Mitchell · Wed, 5 Aug 2009 11:16:03 -0500 ·
This isn't particularly elegant, but something like it should do what you
want:
   #!/bin/bash

   TESTHOSTS="www.google.com www.yahoo.com www.microsoft.com"

   for N in $TESTHOSTS
   do
     curl -s -S -L -m 10 -o /dev/null http://$N
     if [ "$?" -eq "0" ]; then
       # page fetched OK
       break
     fi
     # Ran out of hosts, must be all broken
     $BB $BBDISP "status internet.web `date`
        Cannot reach any common web servers, panic now!!"
     exit 0
   done
   # found at least one working offsite server
   $BB $BBDISP "status internet.web `date`
      Found at least one working offsite server.  The world is still there."
   exit 0


Ralph Mitchell
quoted from Ricardo Stella


On Wed, Aug 5, 2009 at 9:55 AM, Ricardo Stella <user-a9f2fdfdbc44@xymon.invalid> wrote:
Can these be combined as well? Ie do multiple http checks and go red
only if all fail?

TIA...

Josh Luthman wrote:
Might also want to do some HTTP checks.  If your router's NAT table
has problems, connection limits are hit, etc.  Pretty much anything
TCP based but doing an HTTP request to Google should satisfy and be easy.

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

"When you have eliminated the impossible, that which remains, however
improbable, must be the truth."
--- Sir Arthur Conan Doyle


On Wed, Aug 5, 2009 at 10:10 AM, Ricardo Stella <user-a9f2fdfdbc44@xymon.invalid
<mailto:user-a9f2fdfdbc44@xymon.invalid>> wrote:


    Hello,

    We have a request to monitor 'internet' connectivity.  (When it comes
    from higherups...)

    Just pinging up the line might not be good enough as we've had issues
    with our providers in the recent past.  So I figured ping several
well
    known hosts out in the cloud and if all are out, then we have no
    'internet'.

    I came out with the following.  Seems to work, but figure I run it
    thru
    the list in case someone else has done this already...

    page internet Internet Connectivity
    127.0.0.1  INTERNET # conn=ip1,ip2,ip3,ip4,ip5


    TIA...

list Craig Cook · Wed, 5 Aug 2009 12:27:18 -0400 ·
quoted from Francesco Duranti
You can use the bbcombotest to merge the result of all your http content/status check in a single check.
in bbcombotest.cfg you can put something like:

internet.connect = internet.cont1 && internet.cont2 && internet.cont3

remember to change the hobbitlaunch.cfg to include the launch of bbcombotest
Yes, you need to use bbcombotest.  I would not recommend this though:

internet.connect = internet.cont && internet2.cont && internet3.cont

Something like this is safer...

internet.connect = (internet1.cont + internet2.cont + internet3.cont) >= 2

I have used this method before to monitor major 4 web sites and seen one of them fail to respond.  The other 3 were fine so I knew our internet connection was okay.


Craig