Monitoring IPv6 website

Frank Bulk (iname.com) frnkblk at iname.com
Fri Aug 29 20:24:29 CEST 2014


So it looks like the -H makes it a HTTP/1.1 request.

So my theory was that HTTP/1.1 requests make www.timewarnercable.com choke,
but 1.1 requests work fine with curl and wget.


root at nagios:/usr/lib/nagios/plugins# ./check_http -H www.timewarnercable.com
-v
GET / HTTP/1.1
User-Agent: check_http/v1.4.15 (nagios-plugins 1.4.15)
Connection: close
Host: www.timewarnercable.com


CRITICAL - Socket timeout after 10 seconds
root at nagios:/usr/lib/nagios/plugins# curl -v -1 www.timewarnercable.com
* About to connect() to www.timewarnercable.com port 80 (#0)
*   Trying 2001:1998:840:b001::7... connected
* Connected to www.timewarnercable.com (2001:1998:840:b001::7) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0
OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.5
> Host: www.timewarnercable.com
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Date: Fri, 29 Aug 2014 18:22:50 GMT
< Server: Apache
< Location: http://www.timewarnercable.com/en/residential.html
< Cache-Control: max-age=1800
< Expires: Fri, 29 Aug 2014 18:52:50 GMT
< Content-Length: 331
< Keep-Alive: timeout=10, max=586
< Connection: Keep-Alive
< Content-Type: text/html; charset=iso-8859-1
< Set-Cookie: TWC-COOKIE-webcms-twc-sg=BPEGKIEE; Path=/
<
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a
href="http://www.timewarnercable.com/en/residential.html">here</a>.</p>
<hr>
<address>Apache Server at www.timewarnercable.com Port 80</address>
</body></html>
* Connection #0 to host www.timewarnercable.com left intact
* Closing connection #0
root at nagios:/usr/lib/nagios/plugins#
root at nagios:/usr/lib/nagios/plugins# wget -6 -vvvv www.timewarnercable.com
--2014-08-29 13:23:45--  http://www.timewarnercable.com/
Resolving www.timewarnercable.com... 2001:1998:840:b001::7
Connecting to www.timewarnercable.com|2001:1998:840:b001::7|:80...
connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://www.timewarnercable.com/en/residential.html [following]
--2014-08-29 13:23:45--  http://www.timewarnercable.com/en/residential.html
Reusing existing connection to www.timewarnercable.com:80.
HTTP request sent, awaiting response... 200 OK
Length: 101218 (99K) [text/html]
Saving to: âindex.html.3â

100%[=======================================================================
==================================>] 101,218     --.-K/s   in 0.09s

2014-08-29 13:23:46 (1.03 MB/s) - âindex.html.3â

root at nagios:/usr/lib/nagios/plugins#


Frank

-----Original Message-----
From: Help [mailto:help-bounces+frnkblk=iname.com at monitoring-plugins.org] On
Behalf Of zep
Sent: Friday, August 29, 2014 1:14 PM
To: help at monitoring-plugins.org
Subject: Re: Monitoring IPv6 website


curiouser and curiouser..

[root at deathstar plugins]# ./check_http   -6 www.qwest.com -v
GET / HTTP/1.0
User-Agent: check_http/v1.4.16 (nagios-plugins 1.4.16)
Connection: close


http://www.qwest.com:80/ is 376 characters
STATUS: HTTP/1.1 200 OK
**** HEADER ****
Date: Fri, 29 Aug 2014 18:08:02 GMT
Server: Apache
Set-Cookie: TLTSID=6A8055762FA7102F007B8441495A6D11; Path=/
HostName: vlamardmzpd24.centurytel.com
Accept-Ranges: bytes
Cache-Control: max-age=0
Expires: Fri, 29 Aug 2014 18:08:02 GMT
Vary: Accept-Encoding,User-Agent
Content-Length: 17
Connection: close
Content-Type: text/html
**** CONTENT ****
Hello from .42!

HTTP OK: HTTP/1.1 200 OK - 376 bytes in 0.174 second response time
|time=0.173939s;;;0.000000 size=376B;;;0
[root at deathstar plugins]# ./check_http   -6 -H www.qwest.com -v
GET / HTTP/1.1
User-Agent: check_http/v1.4.16 (nagios-plugins 1.4.16)
Connection: close
Host: www.qwest.com


http://www.qwest.com:80/ is 589 characters
STATUS: HTTP/1.1 301 Moved Permanently
**** HEADER ****
Date: Fri, 29 Aug 2014 18:08:08 GMT
Server: Apache
Set-Cookie: TLTSID=6E8BAB5C2FA7102F0019ED7BCA66AF5C; Path=/;
Domain=.qwest.com
HostName: vlamardmzpd24.centurytel.com
Location: http://www.centurylink.com/
Vary: Accept-Encoding
Content-Length: 235
Connection: close
Content-Type: text/html; charset=iso-8859-1
**** CONTENT ****
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a
href="http://www.centurylink.com/">here</a>.</p>
</body></html>

HTTP OK: HTTP/1.1 301 Moved Permanently - 589 bytes in 0.179 second
response time |time=0.178524s;;;0.000000 size=589B;;;0

301 for a -H and 200 for a regular request.   clearly one is doing it
quite differently from the other... not sure which is the 'right' way.

On 08/29/2014 01:56 PM, Frank Bulk wrote:
> I tested that theory a few months ago, but alas, that's not it, as 301
does
> work just fine for www.qwest.com, but not for www.timerwarnercable.com
>
> root at nagios:/usr/lib/nagios/plugins# ./check_http -6 -H www.qwest.com
> HTTP OK: HTTP/1.1 301 Moved Permanently - 589 bytes in 0.163 second
response
> time |time=0.163363s;;;0.000000 size=589B;;;0
> root at nagios:/usr/lib/nagios/plugins#
> root at nagios:/usr/lib/nagios/plugins# ./check_http -6 -H
> www.timewarnercable.com
> CRITICAL - Socket timeout after 10 seconds
> root at nagios:/usr/lib/nagios/plugins#
>
> We may need a NAGIOS developer who understands the check_http code to
chime
> in.
>
> Regards,
>
> Frank
>
> -----Original Message-----
> From: Help [mailto:help-bounces+frnkblk=iname.com at monitoring-plugins.org]
On
> Behalf Of zep
> Sent: Friday, August 29, 2014 9:15 AM
> To: help at monitoring-plugins.org
> Subject: Re: Monitoring IPv6 website
>
>
> On 08/29/2014 09:32 AM, Frank Bulk wrote:
>> But there is!  Try with a typical webbrowser or wget!
>>
>> 	root at nagios:/tmp# wget -6 www.timewarnercable.com
>> 	--2014-08-29 08:31:57--  http://www.timewarnercable.com/
>> 	Resolving www.timewarnercable.com... 2001:1998:840:b001::7
>> 	Connecting to www.timewarnercable.com|2001:1998:840:b001::7|:80...
>> connected.
>> 	HTTP request sent, awaiting response... 301 Moved Permanently
>      ---------------------------------------------------^^^^^^^^^^^^^^^
>> 	Location: http://www.timewarnercable.com/en/residential.html
>> [following]
>> 	--2014-08-29 08:31:57--
>> http://www.timewarnercable.com/en/residential.html
>> 	Reusing existing connection to www.timewarnercable.com:80.
>> 	HTTP request sent, awaiting response... 200 OK
>> 	Length: 101218 (99K) [text/html]
>> 	Saving to: âindex.htmlâ
>>
> I think you may have answered your own question.  
>
> it would seem to me that check_http only considers http response codes
> in the 200 range to be successful and valid, whereas a redirect to a
> different server isn't thought to be a successful test/connection.   
> I'd have to play with some web servers to confirm that notion
>
>






More information about the Help mailing list