Page 1 of 1

check_http for certificate expiry, with apache vhosts

Posted: Wed Feb 08, 2017 10:17 am
by kernow5000
Hi all,

This isn't a major one, but I imagine it's possibly due to the default virtual host on the webserver I'm checking.

I can run:

Code: Select all

./check_http -4 --ssl -H www.domain1.co.uk -C 70
WARNING - Certificate '*.domain1.co.uk' expires in 60 day(s) (2017-04-10 09:30 +0100/BST).
Ok, cool, that's fine. Now to check domain2 which is another SSL name based virtual host on the same box.

Code: Select all

./check_http -4 -S -H www.domain2.co.uk -C 60,30 -t 30
WARNING - Certificate '*.domain1.co.uk' expires in 60 day(s) (2017-04-10 09:30 +0100/BST).

See my issue?

:)


Cheers.

Re: check_http for certificate expiry, with apache vhosts

Posted: Wed Feb 08, 2017 10:18 am
by kernow5000
Just realised the command line arguments are actually different in that code block above. But either does the same thing.

Re: check_http for certificate expiry, with apache vhosts

Posted: Wed Feb 08, 2017 10:28 am
by kernow5000
External SSL scanners are able to identify the domain2.co.uk certificate fine.

Re: check_http for certificate expiry, with apache vhosts

Posted: Wed Feb 08, 2017 10:31 am
by kernow5000
Never mind! sorted, just needed to add --sni to the check and it returns fine.

Found here: https://support.nagios.com/forum/viewto ... 1486395689

Thanks anyway!

Re: check_http for certificate expiry, with apache vhosts

Posted: Wed Feb 08, 2017 10:59 am
by rkennedy
Our day just started and finally getting to the bottom of the queue, just saw this. Glad to hear you got it working with --sni already! :)

Are we good to close this one up?

Re: check_http for certificate expiry, with apache vhosts

Posted: Thu Feb 09, 2017 4:59 am
by kernow5000
Sure , go for it.

Many thanks

Re: check_http for certificate expiry, with apache vhosts

Posted: Thu Feb 09, 2017 10:55 am
by rkennedy
NP.

/closed