7

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 that the domain has wrong certificate. Why is monit not checking the certificate?

Shrinath
  • 7,888
  • 13
  • 48
  • 85

1 Answers1

6

You need to include the certificate valid directive:

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

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

xtian
  • 336
  • 2
  • 6