check_http: Invalid option - SSL is not available

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

check_http: Invalid option - SSL is not available

Postby elembivos » Fri Nov 22, 2019 1:17 pm

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

Re: check_http: Invalid option - SSL is not available

Postby scottwilkerson » Fri Nov 22, 2019 1:32 pm

Hello and welcome to the Nagios Forum!

Can you share the configuration for this service and the configuration for the command it is using?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 17032
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: check_http: Invalid option - SSL is not available

Postby elembivos » Fri Nov 22, 2019 3:01 pm

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

Re: check_http: Invalid option - SSL is not available

Postby scottwilkerson » Fri Nov 22, 2019 3:17 pm

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 17032
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: check_http: Invalid option - SSL is not available

Postby elembivos » Fri Nov 22, 2019 3:26 pm

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

resources.cfg :
$USER1$=/usr/local/nagios/libexec
elembivos
 
Posts: 4
Joined: Fri Nov 22, 2019 12:54 pm

Re: check_http: Invalid option - SSL is not available

Postby scottwilkerson » Fri Nov 22, 2019 3:45 pm

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 17032
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: check_http: Invalid option - SSL is not available

Postby elembivos » Fri Nov 22, 2019 3:58 pm

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

Re: check_http: Invalid option - SSL is not available

Postby scottwilkerson » Fri Nov 22, 2019 4:00 pm

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 17032
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot] and 9 guests