Page 1 of 1

check_http SSL check failing "CRITICAL - Cannot make SSL con

Posted: Mon May 14, 2018 1:39 am
by dervman
Hi there,

NagiosXI: 5.4.11
Check_http: v2.2.1 (nagios-plugins 2.2.1)
CentOS: 6.9 (Final)

Since one of our sites has been moved to a new provider we're getting this error for the Nagios check, It's site specific so Nagios doesn't like something being returned. Any suggestions on how to understand what's not right?

# /usr/local/nagios/libexec/check_http -v -S -H switch.ovoenergy.com
CRITICAL - Cannot make SSL connection.
SSL initialized

For completeness here's a random SSL site that is working
# /usr/local/nagios/libexec/check_http -S -H www.cisco.com
HTTP OK: HTTP/1.1 200 OK - 87081 bytes in 0.051 second response time |time=0.050936s;;;0.000000 size=87081B;;;0
#

Re: check_http SSL check failing "CRITICAL - Cannot make SSL

Posted: Mon May 14, 2018 12:50 pm
by scottwilkerson
Add --sni to your check command

Code: Select all

 --sni
    Enable SSL/TLS hostname extension support (SNI)
this is required by some newer webservers, notably Cloudfront

Re: check_http SSL check failing "CRITICAL - Cannot make SSL

Posted: Tue May 15, 2018 3:50 am
by dervman
Can't believe it was that easy, this URL was recently move to cloudfront.

Code: Select all

# /usr/local/nagios/libexec/check_http -vv --sni  -H switch.ovoenergy.com -S
SSL initialized
GET / HTTP/1.1
User-Agent: check_http/v2.2.1 (nagios-plugins 2.2.1)
Connection: close
Host: switch.ovoenergy.com
Accept: */*

HTTP OK: HTTP/1.1 200 OK - 1687 bytes in 0.145 second response time |time=0.145105s;;;0.000000 size=1687B;;;0


Thanks

Re: check_http SSL check failing "CRITICAL - Cannot make SSL

Posted: Tue May 15, 2018 9:16 am
by scottwilkerson
Yay! Glad to hear it's working.

Locking