check_http checking wrong ssl certificate

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
MajorRaptor
Posts: 2
Joined: Wed Jun 26, 2019 11:22 am

check_http checking wrong ssl certificate

Post 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 ?
MajorRaptor
Posts: 2
Joined: Wed Jun 26, 2019 11:22 am

Re: check_http checking wrong ssl certificate

Post 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 :)
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: check_http checking wrong ssl certificate

Post by cdienger »

Thanks for following up with the fix!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked