[Nagiosplug-help] https problem using check_http

Marc Powell lists at xodus.org
Fri Mar 19 15:14:27 CET 2010


On Mar 19, 2010, at 5:52 AM, Scott, Ewan wrote:

> Marc/Chase
> 
> Thanks for the responses.
> 
>> From what you say I should be looking to use the --ssl option and revise my syntax.
> 
> Strangely however I am using the same syntax for other systems and it works.
> eg.
> # /usr/local/nagios/libexec/check_http -I 150.150.100.57 -u https://150.150.100.57:6789/index.html
> HTTP OK: HTTP/1.1 200 OK - 3109 bytes in 0.009 second response time |time=0.008959s;;;0.000000 size=3109B;;;0

Use -v on the command above to verify that you're checking what you think you're checking. I certain that what is really OK is the default :80 virtual host on that machine. For example, on the machine below, I have nothing listening on port 8080, let alone https --

$ ./check_http -I <redacted> -u https://<redacted>:8080/index.html -v
GET https://<redacted>:8080/index.html HTTP/1.0
User-Agent: check_http/1.89 (nagios-plugins 1.4.3)


http://<redacted>:80https://<redacted>:8080/index.html is 3125 characters
STATUS: HTTP/1.1 200 OK
**** HEADER ****
Date: Fri, 19 Mar 2010 14:08:38 GMT
Server: Apache
Last-Modified: Mon, 31 Oct 2005 15:13:25 GMT
ETag: "14373f-b4a-43663495"
Accept-Ranges: bytes
Content-Length: 2890
Connection: close
Content-Type: text/html
**** CONTENT ****
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
 <HEAD>
  <TITLE>Test Page for the Apache Web Server on Red Hat Linux</TITLE>


> I had tried  the --ssl option previously and got the "check_http: Invalid option - SSL is not available" error message. Hence I ended up trying the above.

Makes sense if it's not checking an HTTPS enabled port.

> Can you confirm that to get round this problem properly I have to recompile the plugins package as "./configure --with-openssl" and then I should be OK?

No, I don't expect you need to do that at all.

--
Marc





More information about the Help mailing list