Page 1 of 1
check_http --ssl still checking HTTP
Posted: Tue Apr 14, 2020 12:58 pm
by Rac007
Hello everybody,
I'm working to check certificate expiration, I use for that the script check_http.
It's work well, but I noticed that in the same time is checking also HTTP
Exemple:
Code: Select all
./check_http -I 127.0.0.1 -p 8080 --ssl --sni -S -j CONNECT -H ********** -u https://www.*******.com -C 30,15
Result
Code: Select all
SSL OK - Certificate ' *************** ' will expire on 2022-04-02 08:38 +0200/CEST.HTTP WARNING: HTTP/1.1 400 Bad Request - 376 bytes in 0.114 second response time
Is there any way to just check only SSL expiration whitout checking HTTP please ?
Thank you for advance.
Re: check_http --ssl still checking HTTP
Posted: Tue Apr 14, 2020 2:03 pm
by jbrunkow
That is odd. I believe that the check should only check the certificate when the
-C option is used, unless the
--continue-after-certificate option is also used.
Code: Select all
-C, --certificate=INTEGER[,INTEGER]
Minimum number of days a certificate has to be valid. Port defaults to 443
(When this option is used the URL is not checked by default. You can use
--continue-after-certificate to override this behavior)
--continue-after-certificate
Allows the HTTP check to continue after performing the certificate check.
Does nothing unless -C is used.
It could have something to do with one of the other options, or the value you are passing through it. Are you entering an
http address for the
-H argument? What happens if you just use one option ( either
-H or
-u ) to specify the address?
Re: check_http --ssl still checking HTTP
Posted: Wed Apr 15, 2020 9:11 am
by Rac007
Hi jbrunkow,
First thank you for your replay
To answer your questions :
Are you entering an http address for the -H argument?
===>no, for the -H argument I entered for example google.com
What happens if you just use one option ( either -H or -u ) to specify the address?
==> I used the option -H only but its doesn't work still having the check of the HTTP
Re: check_http --ssl still checking HTTP
Posted: Wed Apr 15, 2020 4:41 pm
by ssax
Try this:
Code: Select all
./check_http -I 127.0.0.1 -p 8080 --ssl --sni -S -j CONNECT -H ********** -u www.*******.com -C 30,15
Re: check_http --ssl still checking HTTP
Posted: Fri Apr 17, 2020 9:04 am
by Rac007
Hi ssax
I tried your proposition but I still have the check HTPP
Code: Select all
SSL OK - Certificate '***********.com' will expire on 2022-04-02 08:38 +0200/CEST. HTTP WARNING: HTTP/1.1 400 Bad Request - 376 bytes in 0.079 second response time
However, thank you for your help.