# Access Logsatsh via HTTPS

**URL:** https://discuss.elastic.co/t/access-logsatsh-via-https/272780
**Category:** Logstash
**Created:** [May 12, 2021, 8:18am UTC](https://discuss.elastic.co/t/access-logsatsh-via-https/272780 "2021-05-12T08:18:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Abdelhalim](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@Abdelhalim](https://discuss.elastic.co/u/Abdelhalim)
#### Post date: [May 12, 2021, 8:18am UTC](https://discuss.elastic.co/t/access-logsatsh-via-https/272780/1 "2021-05-12T08:18:27Z")

</div>

Hello,

I would like to monitor Logstash with Metricbeat, and TLS is activated in all my cluster (beats, kibana, Elasticsearch) that's why why I run metricbeat, I get an error:

```auto
error making http request: Get "https://10.13.81.40:9600/": http: server gave HTTP response to HTTPS client

```

And in the browser I can access [http://10.13.81.40:9600](http://10.13.81.40:9600) so the https is not configured and I don't know which lines I shoud add in logstash.yml file config to activate it !

My Logstash.yml:

```auto
node.name: LOGSTASH
path.data: /var/lib/logstash
pipeline.ordered: auto
config.reload.automatic: true
http.enabled: true
http.host: 10.13.81.40
http.port: 9600
path.logs: /var/log/logstash
monitoring.enabled: false

```

Logstash-xpack.yml (metricbeat module) :

```auto
- module: logstash
  xpack.enabled: true
  period: 10s
  hosts: ["https://10.13.81.40:9600"]
  username: "remote_monitoring_user"
  password: "PASSWORD"
  ssl.certificate_authorities: ["/etc/metricbeat/certs/ca.crt"]
  ssl.certificate: "/etc/metricbeat/certs/LOGSTASH.crt"
  ssl.key: "/etc/metricbeat/certs/LOGSTASH.key"
  ssl.verification_mode: "full"

```

Could you please help me which lines I shoud add in the logstash.yml to activate the TLS ?

Thanks for your help

---

<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: [June 9, 2021, 8:19am UTC](https://discuss.elastic.co/t/access-logsatsh-via-https/272780/2 "2021-06-09T08:19:19Z")

</div>

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