# ECK Stack Monitoring disable certificate validation on beats

**URL:** <https://discuss.elastic.co/t/eck-stack-monitoring-disable-certificate-validation-on-beats/310875>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Tags:** elastic-stack-monitoring\
**Created:** [July 28, 2022, 1:58pm UTC](https://discuss.elastic.co/t/eck-stack-monitoring-disable-certificate-validation-on-beats/310875 "2022-07-28T13:58:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![clewo](https://avatars.discourse-cdn.com/v4/letter/c/5fc32e/32.png) [@clewo](https://discuss.elastic.co/u/clewo)\
**Post date:** [July 28, 2022, 1:58pm UTC](https://discuss.elastic.co/t/eck-stack-monitoring-disable-certificate-validation-on-beats/310875/1 "2022-07-28T13:58:42Z")

</div>

Hi,

I wanted to setup Stack Monitoring as described here: [Stack Monitoring | Elastic Cloud on Kubernetes [2.3] | Elastic](https://www.elastic.co/guide/en/cloud-on-k8s/2.3/k8s-stack-monitoring.html)

I've provided my own certificate to the elasticsearch cluster which didn't contain a SAN entry for "elasticsearch-es-http.elastic.svc". Therefore the connections from the metric/filebeat to elasticsearch is failing with the following error message:

```auto
{"log.level":"error","@timestamp":"2022-07-28T13:26:36.239Z","log.logger":"publisher_pipeline_output","log.origin":{"file.name":"pipeline/client_worker.go","file.line":150},"message":"Failed to connect to backoff(elasticsearch(https://elasticsearch-es-http.elastic.svc:9200)): Get \"https://elasticsearch-es-http.elastic.svc:9200\": x509: certificate is valid for REDACTED, REDACTED, not elasticsearch-es-http.elastic.svc","service.name":"metricbeat","ecs.version":"1.6.0"}

```

Config looks like:

```auto
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: elasticsearch
  namespace: elastic
spec:
  version: 8.3.2
[...]
  monitoring:
    metrics:
      elasticsearchRefs:
      - name: elasticsearch
    logs:
      elasticsearchRefs:
      - name: elasticsearch
[...]
  http:
    tls:
      certificate:
        secretName: elasticsearch-certificate

```

Is there any possibility to disable the certificate validation for metric/filebeat or change to `ssl.verification_mode: certificate` ?

Thanks!

---

<div class="post-metadata">

**Author:** ![michael.morello](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael.morello/32/47448_2.png) [@michael.morello](https://discuss.elastic.co/u/michael.morello)\
**Post date:** [August 22, 2022, 6:24am UTC](https://discuss.elastic.co/t/eck-stack-monitoring-disable-certificate-validation-on-beats/310875/2 "2022-08-22T06:24:28Z")

</div>

Hi, sorry for the late reply. This should be fixed by [Stack monitoring: trust custom cert. in output configuration by barkbay · Pull Request #5945 · elastic/cloud-on-k8s · GitHub](https://github.com/elastic/cloud-on-k8s/pull/5945) scheduled for ECK 2.5.0

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 19, 2022, 6:24am UTC](https://discuss.elastic.co/t/eck-stack-monitoring-disable-certificate-validation-on-beats/310875/3 "2022-09-19T06:24:36Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
