Page 1 of 1

check_http: Invalid option - SSL is not available

Posted: Fri Nov 22, 2019 1:17 pm
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]

Re: check_http: Invalid option - SSL is not available

Posted: Fri Nov 22, 2019 1:32 pm
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?

Re: check_http: Invalid option - SSL is not available

Posted: Fri Nov 22, 2019 3:01 pm
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$
}

Re: check_http: Invalid option - SSL is not available

Posted: Fri Nov 22, 2019 3:17 pm
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

Re: check_http: Invalid option - SSL is not available

Posted: Fri Nov 22, 2019 3:26 pm
by elembivos
locate check_http:
/usr/lib/nagios/plugins/check_http
/usr/local/nagios/libexec/check_http

resources.cfg :
$USER1$=/usr/local/nagios/libexec

Re: check_http: Invalid option - SSL is not available

Posted: Fri Nov 22, 2019 3:45 pm
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

Re: check_http: Invalid option - SSL is not available

Posted: Fri Nov 22, 2019 3:58 pm
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

Re: check_http: Invalid option - SSL is not available

Posted: Fri Nov 22, 2019 4:00 pm
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