如何在monit中检查具有有效HTTPS证书的URL?

时间:2015-07-10 06:30:39

标签: ssl ssl-certificate monit

我有以下配置 -

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

它只是连接并且从不检查域是否有错误的证书。为什么monit不检查证书?

1 个答案:

答案 0 :(得分:3)

您需要包含certificate valid指令:

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

请参阅此处的文档:https://mmonit.com/monit/documentation/monit.html#CONNECTION-TESTING