How to check url with valid https certificate in monit?

I have the following configuration -

check host qbox_logstash_1
  with address blah.mysite.com
  group qbox
  if failed
    host blah.mysite.com
    port 443
    type TCPSSL
    protocol https
    http headers [ Authorization: Basic dXJiYW5sYWiYW5sBlaHToHideThisAuthMjM= ]
  then alert

It just connects and never checks if the domain has the wrong certificate. Why does monit not verify the certificate?

+4
source share
1 answer

You need to include the directive certificate valid:

if failed
  ...
  certificate valid > 10 days
then alert

See the documentation here: https://mmonit.com/monit/documentation/monit.html#CONNECTION-TESTING

+2
source

All Articles