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
elembivos
Posts: 4
Joined: Fri Nov 22, 2019 12:54 pm

check_http: Invalid option - SSL is not available

Post by elembivos »

Checking for certificate expiration of AWS hosts, but Core 4.4.0 responds with check_http: Invalid option - SSL is not available.
Can you help in resolving this?


Nagios CLI:
/usr/lib/nagios/plugins/check_http -p 443 -H domainname.com -C 28,14
OK - Certificate '*.*' will expire on Feb 2020 02:05:00 PM UTC.



Nagios Console:
Current Status: UNKNOWN (for 0d 18h 43m 29s) (Has been acknowledged)
Status Information: check_http: Invalid option - SSL is not available
Usage:
check_http -H <vhost>
Performance Data: -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]
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 »

Hello and welcome to the Nagios Forum!

Can you share the configuration for this service and the configuration for the command it is using?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
elembivos
Posts: 4
Joined: Fri Nov 22, 2019 12:54 pm

Re: check_http: Invalid option - SSL is not available

Post by elembivos »

Hello thank you for your reply!

Code: Select all

define service {
        use                                  generic-service
        host_name                       privatedomainname.com
        service_description          SSL_Check
        check_command              check_http! -p 443 -H privatedomainname.com -C 30,14
}


define command {
    command_name    check_http
    command_line       $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
}
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 »

Does $USER1$ point to /usr/lib/nagios/plugins in your resources.cfg file?

Is it possible you have more than 1 check_http ?

Code: Select all

locate check_http
or

Code: Select all

find / -name check_http
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
elembivos
Posts: 4
Joined: Fri Nov 22, 2019 12:54 pm

Re: check_http: Invalid option - SSL is not available

Post by elembivos »

locate check_http:
/usr/lib/nagios/plugins/check_http
/usr/local/nagios/libexec/check_http

resources.cfg :
$USER1$=/usr/local/nagios/libexec
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 »

There's the problem, it looks like the plugin you have in /usr/local/nagios/libexec wasn't compiled with SSL support

You can confirm by running what nagios is attempting to run

Code: Select all

/usr/local/nagios/libexec/check_http -p 443 -H domainname.com -C 28,14
If you would like you could just replace the /usr/local/nagios/libexec/check_http file with the /usr/lib/nagios/plugins/check_http file

Code: Select all

cp /usr/lib/nagios/plugins/check_http /usr/local/nagios/libexec/check_http
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
elembivos
Posts: 4
Joined: Fri Nov 22, 2019 12:54 pm

Re: check_http: Invalid option - SSL is not available

Post by elembivos »

scottwilkerson wrote:There's the problem, it looks like the plugin you have in /usr/local/nagios/libexec wasn't compiled with SSL support

You can confirm by running what nagios is attempting to run

Code: Select all

/usr/local/nagios/libexec/check_http -p 443 -H domainname.com -C 28,14
If you would like you could just replace the /usr/local/nagios/libexec/check_http file with the /usr/lib/nagios/plugins/check_http file

Code: Select all

cp /usr/lib/nagios/plugins/check_http /usr/local/nagios/libexec/check_http

Thank you for your assistance! This resolved the issue.
Status Information: OK - Certificate
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 »

elembivos wrote:
scottwilkerson wrote:There's the problem, it looks like the plugin you have in /usr/local/nagios/libexec wasn't compiled with SSL support

You can confirm by running what nagios is attempting to run

Code: Select all

/usr/local/nagios/libexec/check_http -p 443 -H domainname.com -C 28,14
If you would like you could just replace the /usr/local/nagios/libexec/check_http file with the /usr/lib/nagios/plugins/check_http file

Code: Select all

cp /usr/lib/nagios/plugins/check_http /usr/local/nagios/libexec/check_http

Thank you for your assistance! This resolved the issue.
Status Information: OK - Certificate
Great!

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