# Metricbeat (7.7) --\> SSL conexion --\> Logstash (7.7)

**URL:** https://discuss.elastic.co/t/metricbeat-7-7-ssl-conexion-logstash-7-7/236123
**Category:** Elastic Stack
**Created:** [June 8, 2020, 5:55am UTC](https://discuss.elastic.co/t/metricbeat-7-7-ssl-conexion-logstash-7-7/236123 "2020-06-08T05:55:57Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![NoobUser404](https://avatars.discourse-cdn.com/v4/letter/n/67e7ee/32.png) [@NoobUser404](https://discuss.elastic.co/u/NoobUser404)
#### Post date: [June 8, 2020, 5:55am UTC](https://discuss.elastic.co/t/metricbeat-7-7-ssl-conexion-logstash-7-7/236123/1 "2020-06-08T05:55:57Z")

</div>

I'm trying to send secure data to logstash from metricbeat, inside my own computer. I followed the tutorial ([https://www.elastic.co/es/blog/configuring-ssl-tls-and-https-to-secure-elasticsearch-kibana-beats-and-logstash#create-ssl](https://www.elastic.co/es/blog/configuring-ssl-tls-and-https-to-secure-elasticsearch-kibana-beats-and-logstash#create-ssl)) but I have the error `SSLV3_ALERT_BAD_CERTIFICATE` although it is an info message I do not get any thing from metricbeat.

I just want to send encrypted data from metricbeat to logstash, so I made this instance.yml from the example:

```
instances:
  - name: 'logstash'
    dns: ['localhost']

```

Then I generate the certs `bin/elasticsearch-certutil cert ca --pem --in ~/tmp/cert_blog/instance.yml --out ~/tmp/cert_blog/certs.zip`. I copy them into the folders in his place, both metricbeat and logstash.

This is the filter I use in logstash:

```
input{
  beats{
    port => 5044
    ssl => true
	ssl_certificate_authorities => ['C:/..location../config/certs/ca.crt']
    ssl_key => 'C:/..location../config/certs/logstash.pkcs8.key'
    ssl_certificate => 'C:/..location../config/certs/logstash.crt'
  }
}

output {
  stdout{}
}

```

This is the config I use in metricbeat:

```
output.logstash:
  hosts: ["0.0.0.0:5044"]

  ssl.certificate_authorities: ['C:/..location../config/certs/ca.crt']

```

\*\*\*_Extra question: If I wanted to change the port, should I change the instance.yml file adding the port to the dns? Like 'localhost:xxxx'_

---

<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: [November 4, 2022, 8:01am UTC](https://discuss.elastic.co/t/metricbeat-7-7-ssl-conexion-logstash-7-7/236123/2 "2022-11-04T08:01:31Z")

</div>


