Page 1 of 1

check_http checking wrong ssl certificate

Posted: Wed Jun 26, 2019 11:34 am
by MajorRaptor
Hi,

I'm currently trying to configure my monitoring server to check SSL validity to determine renewal fails.
I've found out that check_http -C allow to check expiration but I can't make it work the way I want.

It seems the command does not take the specified vhost into consideration when it comes to ssl validity checks.
On standard http check, it works perfectly and check the url but on ssl check it automatically checks the first vhost of the server.

Let's admit aaa.com and bbb.com are two website hosted on the same serveur

Code: Select all

check_http -C 15 -H aaa.com

Code: Select all

check_http -C 15 -H bbb.com
Both of those commands will return
OK - Certificate 'aaa.com' will expire on Sun 01 Sep 2019 12:00:24 AM GMT +0000.

Does this come from the way I use the command or is it a bug ?

Re: check_http checking wrong ssl certificate

Posted: Thu Jun 27, 2019 5:52 am
by MajorRaptor
After further investigations the --sni option saved the day.
I didn't know about this, at all. Thx anyway, I hope this helps someone else in the future :)

Re: check_http checking wrong ssl certificate

Posted: Thu Jun 27, 2019 9:00 am
by cdienger
Thanks for following up with the fix!