CastawayLabs / cachet-monitor

Distributed monitoring plugin for CachetHQ
https://castawaylabs.github.io/cachet-monitor/
MIT License
439 stars 127 forks source link

HTTPs "strict: false" is not working #123

Closed andelhie closed 4 years ago

andelhie commented 4 years ago

I am trying to monitor the API endpoint of a Kubernetes cluster. The endpoint is using a self signed cert so I set the strict: false but I am getting a error.

Get https://10.40.154.224:6443/healthz: x509: certificate signed by unknown authority

Here is what i have in the monitor config section.

  - name: k8-istio2
    target: https://10.40.154.224:6443/healthz
    strict: false
    method: GET
    component_id: 4
    #metric_id: 4

    template:
      investigating:
        subject: "{{ .Monitor.Name }} - {{ .SystemName }}"
        message: "{{ .Monitor.Name }} check **failed** (server time: {{ .now }})\n\n{{ .FailReason }}"
      fixed:
        subject: "I HAVE BEEN FIXED"

    interval: 1
    timeout: 1
    threshold: 80
    expected_status_code: 200

I would hope marking it false would ignore the x509 error.

andelhie commented 4 years ago

it now switched that was odd.

kgrvamsi commented 4 years ago

@andelhie did strict false worked?i still see issues when i used strict false on one of the api