We're moving to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.

Go to the Answer Hub

Check SSL expiration and ignore "No data received from host"

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Check SSL expiration and ignore "No data received from host"

Postby nov1ce » Thu Jan 20, 2022 9:54 am

Hello,

I have a simple check_http check that monitors the expiration of SSL certificates:

check_http -I 192.168.0.2 -H 192.168.0.2 -S -C 60 --sni

which returns:

SSL OK - Certificate 'xxx certificate' will expire on 2022-09-29 15:29 +0200/CEST. HTTP CRITICAL - No data received from host

"HTTP CRITICAL - No data received from host" part is expected.

Is there any way I can ignore it so the service status is green (OK) as per SSL check? Right now it's reported as Critical.

Thank you.
nov1ce
 
Posts: 3
Joined: Fri Mar 16, 2018 10:09 am

Re: Check SSL expiration and ignore "No data received from h

Postby pbroste » Tue Jan 25, 2022 3:00 pm

Hello @nov1ce

Thanks for reaching out, want to see what the results look like when you add verbose output:

Code: Select all
check_http -I 192.168.0.2 -H 192.168.0.2 -S -C 60 --sni -verbose


Also toggle --sni switch to compare the results, with the option to add the '--continue-after-certificate' switch.

Please let us know how things look,
Perry
User avatar
pbroste
 
Posts: 1281
Joined: Tue Jun 01, 2021 1:27 pm

Re: Check SSL expiration and ignore "No data received from h

Postby nov1ce » Wed Jan 26, 2022 3:29 am

Hello @pbroste

Thanks for your reply.

Here is how the verbose output looks like:

Code: Select all
SSL initialized
SSL OK - Certificate 'VPN Certificate' will expire on 2022-09-29 15:29 +0200/CEST. GET / HTTP/1.1
User-Agent: check_http/v2.2.1.git (nagios-plugins 2.2.1)
Connection: close
Host: 192.168.0.2
Accept: */*


HTTP CRITICAL - No data received from host

Omitting --sni switch doesn't change anything and --continue-after-certificate is unrecognized:

Code: Select all
check_http: unrecognized option '--continue-after-certificate'
nov1ce
 
Posts: 3
Joined: Fri Mar 16, 2018 10:09 am


Return to Community Support

Who is online

Users browsing this forum: NuxibaNOC and 31 guests