[Nagiosplug-devel] Check_http suggestion

Hiren Patel hir3npatel at gmail.com
Thu Jun 11 21:21:29 CEST 2009


Marc Powell wrote:
>>> personally I think it's a good idea, it could be useful in cases like
>>> yours, would a patch for this be accepted? I'd be prepared to work on
>>> this if core developers would accept it?
> 
> There's no need as far as I can tell. Maybe it's some voodoo from the  
> proxies I use but I don't believe so --
> 
> $ ~nagios/libexec/check_http -v -I cache01.davidson.tn.ena.net -p 8080  
> -H transamrit.net -u http://transamrit.net:8082
> GET http://transamrit.net:8082 HTTP/1.0
> User-Agent: check_http/1.89 (nagios-plugins 1.4.3)
> Host: transamrit.net
> 
> 
> http://cache01.davidson.tn.ena.net:8080http://transamrit.net:8082 is  
> 14868 characters
> STATUS: HTTP/1.1 200 OK
> **** HEADER ****
> Content-Type: text/html; charset=iso-8859-1
> Via: 1.1 cache01.davidson
> Content-Length: 14690
> Connection: close
> Age: 0
> Date: Thu, 11 Jun 2009 16:41:13 GMT
> **** CONTENT ****
> <html>
> <head>
> <title>BNBT Tracker Info</title>
> 
> {snip}
> HTTP OK HTTP/1.1 200 OK - 14868 bytes in 0.703 seconds | 
> time=0.703203s;;;0.000000 size=14868B;;;0
> 
ah okay, looks legit.
from http://www.ietf.org/rfc/rfc2616.txt:
-------
5.1 Request-Line

    The Request-Line begins with a method token, followed by the
    Request-URI and the protocol version, and ending with CRLF. The
    elements are separated by SP characters. No CR or LF is allowed
    except in the final CRLF sequence.

         Request-Line   = Method SP Request-URI SP HTTP-Version CRLF

Request-URI    = "*" | absoluteURI | abs_path | authority


.....

The absoluteURI form is REQUIRED when the request is being made to a
    proxy. The proxy is requested to forward the request or service it
    from a valid cache, and return the response. Note that the proxy MAY
    forward the request on to another proxy or directly to the server 
specified by the absoluteURI

....

An example
    Request-Line would be:

        GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1
-------
sorry for the noise, seems -I and -u can be used to request from a proxy 
then, not too sure about socks either.




More information about the Devel mailing list