# Hearbeat and elasticsearch : x509: certificate signed by unknown authority

**URL:** https://discuss.elastic.co/t/hearbeat-and-elasticsearch-x509-certificate-signed-by-unknown-authority/178865
**Category:** Beats
**Tags:** heartbeat
**Created:** [April 29, 2019, 8:37am UTC](https://discuss.elastic.co/t/hearbeat-and-elasticsearch-x509-certificate-signed-by-unknown-authority/178865 "2019-04-29T08:37:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![meddreamer](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@meddreamer](https://discuss.elastic.co/u/meddreamer)
#### Post date: [April 29, 2019, 8:37am UTC](https://discuss.elastic.co/t/hearbeat-and-elasticsearch-x509-certificate-signed-by-unknown-authority/178865/1 "2019-04-29T08:37:12Z")

</div>

Hi,

I am trying to configure heartbeat with elasticsearch and kibana.  
I am using version 6.7.1  
I am receiving this error:

> 2019-04-29T11:34:10.127+0300 ERROR instance/beat.go:906 Exiting: fail to create the Elasticsearch loader: Error creating Elasticsearch client: Couldn't connect to any of the configured Elasticsearch hosts. Errors: [Error connection to Elasticsearch [https://localhost:9200](https://localhost:9200): Get [https://localhost:9200](https://localhost:9200): x509: certificate signed by unknown authority]

My heartbeat.yml file

> output.elasticsearch:  
> hosts: "[https://localhost:9200](https://localhost:9200)"  
> username: "admin"  
> password: "..."
> 
> heartbeat.config.monitors:  
> path: /etc/heartbeat/monitors.d/\*.yml  
> reload.enabled: true  
> reload.period: 5s
> 
> heartbeat.monitors:
> 
> - type: http  
> urls:  
> - "[xxxxx.com](https://xxxxx.com/develop/)"  
> - "[http://localhost:9200](http://localhost:9200)"  
> schedule: '@every 10s'
> 
> setup.kibana:  
> host: "[http://localhost:5601](http://localhost:5601)"
> 
> ssl.verification\_mode: none

---

<div class="post-metadata">

### Author: ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)
#### Post date: [April 29, 2019, 2:54pm UTC](https://discuss.elastic.co/t/hearbeat-and-elasticsearch-x509-certificate-signed-by-unknown-authority/178865/2 "2019-04-29T14:54:37Z")

</div>

Please properly format your config file use the `</>`-Button or backticks.

Please no passwords, even if it's localhost.

The ssl setting must be part of the elasticsearch output. Like:

```auto
output.elasticsearch:
  hosts: [".."]
  username: 'admin'
  password: '...'
  ssl.verification_mode: none

```

---

<div class="post-metadata">

### Author: ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)
#### Post date: [April 29, 2019, 3:20pm UTC](https://discuss.elastic.co/t/hearbeat-and-elasticsearch-x509-certificate-signed-by-unknown-authority/178865/3 "2019-04-29T15:20:54Z")

</div>

Can you reach that host when using `curl` or other clients? Have you verified that your certificate is in fact valid?

---

<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: [May 27, 2019, 3:20pm UTC](https://discuss.elastic.co/t/hearbeat-and-elasticsearch-x509-certificate-signed-by-unknown-authority/178865/4 "2019-05-27T15:20:59Z")

</div>

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