check_http: Invalid option - SSL is not available

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
rlevick
Posts: 49
Joined: Tue Jan 07, 2014 4:20 pm

check_http: Invalid option - SSL is not available

Post by rlevick »

So I have a number of local sites that use SSL. I edited the default check_http command and ran it manually. On my old Nagios server it works, not on the new.

/usr/local/nagios/libexec/check_http -H <server> -S -w 30 -c 120
HTTP OK - HTTP/1.1 302 Found - 0.059 second response time |time=0.058508s;30.000000;120.000000;0.000000 size=209B;;;0

# /usr/local/nagios/libexec/check_http -H <server> -S -w 30 -c 120
check_http: Invalid option - SSL is not available
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: check_http: Invalid option - SSL is not available

Post by abrist »

First, make sure the server supports ssl:

Code: Select all

nmap <server> -p 443
And lets check where your ssl bin is:

Code: Select all

which openssl
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: check_http: Invalid option - SSL is not available

Post by tmcdonald »

Assuming a RHEL or CentOS installation:

Code: Select all

yum -y install openssl openssl-devel
cd /tmp
wget http://www.nagios-plugins.org/download/nagios-plugins-1.5.tar.gz
tar xzf nagios-plugins-1.5.tar.gz
cd nagios-plugins-1.5
./configure --with-openssl
make all
make install
This assumes you have all the standard gcc, make, etc. available.
Former Nagios employee
rlevick
Posts: 49
Joined: Tue Jan 07, 2014 4:20 pm

Re: check_http: Invalid option - SSL is not available

Post by rlevick »

]# nmap <server> -p 443

Starting Nmap 5.51 ( http://nmap.org ) at 2014-02-05 11:02 CST
Nmap scan report for <server>1 (172.xx.xx.xx)
Host is up (0.00061s latency).
rDNS record for 172.xx.xx.xx: <server>
PORT STATE SERVICE
443/tcp open https

Nmap done: 1 IP address (1 host up) scanned in 0.15 seconds
[root@vfcmon-01 servers]# which openssl
/usr/bin/openssl
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: check_http: Invalid option - SSL is not available

Post by tmcdonald »

I might also add that you need openssl-devel as well, if you don't already. I updated my post to reflect this.
Former Nagios employee
rlevick
Posts: 49
Joined: Tue Jan 07, 2014 4:20 pm

Re: check_http: Invalid option - SSL is not available

Post by rlevick »

So I still need to install the plugins with openssl?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: check_http: Invalid option - SSL is not available

Post by tmcdonald »

rlevick wrote:So I still need to install the plugins with openssl?
Recompile, but basically yes.
Former Nagios employee
rlevick
Posts: 49
Joined: Tue Jan 07, 2014 4:20 pm

Re: check_http: Invalid option - SSL is not available

Post by rlevick »

slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_http: Invalid option - SSL is not available

Post by slansing »

You need to wget the tarball:

Code: Select all

wget http://www.nagios-plugins.org/download/nagios-plugins-1.5.tar.gz
rlevick
Posts: 49
Joined: Tue Jan 07, 2014 4:20 pm

Re: check_http: Invalid option - SSL is not available

Post by rlevick »

Sweet! It's working. Thank you!
Locked