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.
Locked
dragan979
Posts: 11
Joined: Thu Jun 29, 2017 8:51 am

check_http: Invalid option - SSL is not available

Post by dragan979 »

I installed Nagios core 4.5.4 and compiled nagios plugin 2.1.2 on CentOS 8.

Code: Select all

dnf install openssl-devel openssl 
Last metadata expiration check: 1:19:02 ago on Wed 13 Nov 2019 12:56:30 PM CET.
Package openssl-devel-1:1.1.1-8.el8.x86_64 is already installed.
Package openssl-1:1.1.1-8.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Then compiled plugin

Code: Select all


./configure --with-openssl --with-nagios-user=nagios --with-nagios-group=nagios
Output is that openssl is set to NO

Code: Select all

config.status: creating po/Makefile
            --with-apt-get-command: 
              --with-ping6-command: /sbin/ping6 -n -U -w %d -c %d %s
               --with-ping-command: /sbin/ping -n -U -w %d -c %d %s
                       --with-ipv6: yes
                      --with-mysql: no
                    --with-openssl: no
                     --with-gnutls: no
               --enable-extra-opts: yes
                       --with-perl: /bin/perl
             --enable-perl-modules: no
                     --with-cgiurl: /nagios/cgi-bin
               --with-trusted-path: /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
                   --enable-libtap: no


I want to check SSL expiration date:

Code: Select all

/usr/local/nagios/libexec/check_http -H 1.1.1.1 -S                                                           
check_http: Invalid option - SSL is not available
Usage:
 check_http -H <vhost> | -I <IP-address> [-u <uri>] [-p <port>]
       [-J <client certificate file>] [-K <private key>]
       [-w <warn time>] [-c <critical time>] [-t <timeout>] [-L] [-E] [-a auth]
       [-b proxy_auth] [-f <ok|warning|critcal|follow|sticky|stickyport>]
       [-e <expect>] [-d string] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]
       [-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]
       [-A string] [-k string] [-S <version>] [--sni] [-C <warn_age>[,<crit_age>]]
       [-T <content-type>] [-j method]
Can anyone guide me in right direction ?.

Thanks in advance.
dragan979
Posts: 11
Joined: Thu Jun 29, 2017 8:51 am

Re: check_http: Invalid option - SSL is not available

Post by dragan979 »

After many failed attempts, finally found solution:

Code: Select all

cd /tmp
wget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugins/nagios-plugins/archive/release-2.2.1.tar.gz
tar zxf nagios-plugins.tar.gz
cd /tmp/nagios-plugins-release-2.2.1/
./tools/setup
./configure --with-openssl --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
Finally got yes for enable ssl, and error is gone.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_http: Invalid option - SSL is not available

Post by scottwilkerson »

dragan979 wrote:After many failed attempts, finally found solution:

Code: Select all

cd /tmp
wget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugins/nagios-plugins/archive/release-2.2.1.tar.gz
tar zxf nagios-plugins.tar.gz
cd /tmp/nagios-plugins-release-2.2.1/
./tools/setup
./configure --with-openssl --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
Finally got yes for enable ssl, and error is gone.
Glad you got it resolved!

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked