How to check a URL with valid HTTPS certificate in monit?
Asked Answered
M

1

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?

Marker answered 10/7, 2015 at 6:30 Comment(1)
maybe the 3. point in this source may help you mmonit.com/wiki/Monit/EnableSSLInMonitTypography
P
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

Psychologize answered 21/7, 2016 at 23:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.