check_http SSL check failing "CRITICAL - Cannot make SSL con

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dervman
Posts: 2
Joined: Wed Sep 30, 2015 4:46 am

check_http SSL check failing "CRITICAL - Cannot make SSL con

Post 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
#
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
dervman
Posts: 2
Joined: Wed Sep 30, 2015 4:46 am

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

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post by scottwilkerson »

Yay! Glad to hear it's working.

Locking
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked