# Metricbeat failed with Certificate error

**URL:** https://discuss.elastic.co/t/metricbeat-failed-with-certificate-error/218744
**Category:** Beats
**Tags:** metricbeat
**Created:** [February 11, 2020, 9:32am UTC](https://discuss.elastic.co/t/metricbeat-failed-with-certificate-error/218744 "2020-02-11T09:32:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![kasim123](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kasim123/32/58684_2.png) [@kasim123](https://discuss.elastic.co/u/kasim123)
#### Post date: [February 11, 2020, 9:32am UTC](https://discuss.elastic.co/t/metricbeat-failed-with-certificate-error/218744/1 "2020-02-11T09:32:40Z")

</div>

Hi Team,

I have configure EFK with xpack enabled. I was able to configure kibana and fluent-bit with same ssl certificates. Now i am trying to configure metricbeat in my cluster.  
It failed to pass readiness probe check.

I createdCA certificate without any dns name /elasticsearch-certutil ca and generate certficates. I converteed PKC#12 keystore to PEM format. I was able to use same certificate for kibana and fluent-bit ( tls.verify Off). I am not abel to use same certificate with metricbeat.

```auto
sh-4.2# metricbeat test output
elasticsearch: https://elasticsearch-master:9200...
  parse url... OK
  connection...
    parse host... OK
    dns lookup... OK
    addresses: 10.233.33.200
    dial up... OK
  TLS...
    security: server's certificate chain verification is enabled
    handshake... ERROR x509: certificate is not valid for any names, but wanted to match elasticsearch-master
sh-4.2#

```

metricbeat.yaml output.

```auto

sh-4.2# cat metricbeat.yml
metricbeat.modules:
- module: kubernetes
  metricsets:
    - container
    - node
    - pod
    - system
    - volume
  period: 10s
  host: "${NODE_NAME}"
  hosts: ["${NODE_NAME}:10255"]
  processors:
  - add_kubernetes_metadata:
      in_cluster: true
- module: kubernetes
  enabled: true
  metricsets:
    - event
- module: system
  period: 10s
  metricsets:
    - cpu
    - load
    - memory
    - network
    - process
    - process_summary
  processes: ['.*']
  process.include_top_n:
    by_cpu: 5
    by_memory: 5
- module: system
  period: 1m
  metricsets:
    - filesystem
    - fsstat
  processors:
  - drop_event.when.regexp:
      system.filesystem.mount_point: '^/(sys|cgroup|proc|dev|etc|host|lib)($|/)'
output.elasticsearch:
  username: '${ELASTICSEARCH_USERNAME}'
  password: '${ELASTICSEARCH_PASSWORD}'
  protocol: https
  hosts: ["elasticsearch-master:9200"]
  ssl.certificate_authorities: ["/usr/share/metricbeat/config/certs/elastic-certificate.pem"]

```

---

<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 10, 2020, 9:32am UTC](https://discuss.elastic.co/t/metricbeat-failed-with-certificate-error/218744/2 "2020-03-10T09:32:51Z")

</div>

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