check_http --ssl fails after upgrade to 2.2.x

This forum is intended for the discussion of Nagios plugin development. Feature requests, patches, bug fixes, and all types of development-related discussions are welcome!

NOTE: The SourceForge.net nagiosplug-devel mailing list has been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

check_http --ssl fails after upgrade to 2.2.x

Postby rpiola » Wed May 10, 2017 9:06 am

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
rpiola
 
Posts: 1
Joined: Wed May 10, 2017 8:52 am

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

Postby tgriep » Wed May 10, 2017 1:05 pm

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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 6019
Joined: Thu Oct 30, 2014 9:02 am


Return to Nagios Plugin Development

Who is online

Users browsing this forum: No registered users and 2 guests