# Metricbeat module not sending TLS certificate

**URL:** <https://discuss.elastic.co/t/metricbeat-module-not-sending-tls-certificate/353837>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [February 22, 2024, 4:49am UTC](https://discuss.elastic.co/t/metricbeat-module-not-sending-tls-certificate/353837 "2024-02-22T04:49:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pandu\_Purnama](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pandu_purnama/32/123002_2.png) [@Pandu\_Purnama](https://discuss.elastic.co/u/Pandu_Purnama)\
**Post date:** [February 22, 2024, 4:49am UTC](https://discuss.elastic.co/t/metricbeat-module-not-sending-tls-certificate/353837/1 "2024-02-22T04:49:59Z")

</div>

Hello,

I have Metricbeat 8.9.0 pod trying to scrape Prometheus metrics using this config

```auto
    - module: prometheus
      hosts: ["https://prometheus.demo.svc:9090"]
      ssl.enabled: true
      ssl.certificate: "/tmp/tls.crt"
      ssl.key: "/tmp/tls.key"
      ssl.certificate_authorities: ["/tmp/root/ca.pem"]

```

The Prometheus server is using mTLS.  
Metricbeat fails to connect & got this error on log

```auto
{\n \"message\": \"unable to fetch data from prometheus endpoint https://prometheus.demo.svc:9090/api/v1/query?query=increase%28data_service_notifications_sent_total%5B90s%5D%29: error making http request: Get \\\"https://prometheus.demo.svc:9090/api/v1/query?query=increase%28data_service_notifications_sent_total%5B90s%5D%29\\\": remote error: tls: certificate required\"\n }\n}","service.name":"metricbeat","ecs.version":"1.6.0"}

```

I can confirm that Prometheus server is working fine as I have other app that can connect to it without issue.  
I can also confirm that Prometheus server not receiving certificate because on its log I can see `tls: client didn't provide a certificate`.  
If its invalid certificate on log it will say `tls: bad certificate`.

Am I missing something?

Thanks

---

<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:** [March 21, 2024, 6:50am UTC](https://discuss.elastic.co/t/metricbeat-module-not-sending-tls-certificate/353837/2 "2024-03-21T06:50:36Z")

</div>

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