Shrinath
Shrinath

Reputation: 8118

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

Upvotes: 7

Views: 5012

Answers (1)

xtian
xtian

Reputation: 336

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

Upvotes: 6

Related Questions