Page 1 of 1

check_http --ssl fails after upgrade to 2.2.x

Posted: Wed May 10, 2017 9:06 am
by rpiola
I have several checks on network appliances made as
check_http -H x.x.x.x -S -N -e HTTP
(just checking that the http server is working... a -N has been added because some appliances have old protocol versions, or self-signed certificates)

all checks were working fine up to nagios-plugins-2.1.4

when I upgraded to 2.2.1, suddenly I received a lot of critical alerts. I investigated more and found that check_http reaches a timeout, even if I omit the -e:

Code: Select all

root@ada:~# /root/nagios-plugins-2.2.1/plugins/check_http -vv -H 10.9.66.3 -S  -N
SSL initialized
GET / HTTP/1.1
User-Agent: check_http/v2.2.1 (nagios-plugins 2.2.1)
Connection: close
Host: 10.9.66.3
Accept: */*


https://10.9.66.3:443/ is 3129 characters
STATUS: HTTP/1.1 200 OK
CRITICAL - Socket timeout
while the old plugin worked fine:

Code: Select all

root@ada:~# /root/nagios-plugins-2.1.4/plugins/check_http -vv -H 10.9.66.3 -S  -N
SSL initialized
GET / HTTP/1.1
User-Agent: check_http/v2.1.4 (nagios-plugins 2.1.4)
Connection: close
Host: 10.9.66.3
Accept: */*


https://10.9.66.3:443/ is 3129 characters
STATUS: HTTP/1.1 200 OK
**** HEADER ****
Date: Wed, 10 May 2017 13:59:34 GMT
Connection: close
Content-Type: text/html
X-Frame-Options: DENY
Content-Length: 2984
**** CONTENT ****
  [[ skipped ]]
HTTP OK: HTTP/1.1 200 OK - 3129 bytes in 0.127 second response time |time=0.126552s;;;0.000000 size=3129B;;;0
I tried to upgrade to the latest openssl (via apt-get upgrade openssl openssl-devel ... it is an ubuntu 12.04.5 64 bit), and recompile, but no luck.

I also tried to install the intermediate nagios-plugins-2.2.0, but same result.

checks without the -N switch do work fine

Re: check_http --ssl fails after upgrade to 2.2.x

Posted: Wed May 10, 2017 1:05 pm
by tgriep
It looks like you found a bug and I would recommend that you report the issue you are having with the plugin here: https://github.com/nagios-plugins/nagios-plugins/issues
Our developers will be looking into it as soon as they can.

I tested the plugin on an Ubuntu 16.04 system and is seemed to fail the same way as you described.