Connecting logstash to Elasticsearch via SSL

So I have read that since v8.0 Elasticsearch has encryption turned on by default for connections from Logstash, Kabana, Beats.

But I'm not finding a guide on how to setup the certificate and connect to Elasticsearch from Logstash in the output section of the conf file.

I see Elasticsearch on installation, has created a self-signed certificate, but how do I use that with logstash?

Appreciate the help.

See here

So You need to make that CA certificate That was generated by Elasticsearch available for logstash... Copy it to where logstash is running.

See here

In short in the elasticsearch output section you will set

"cacert => /path/to/cert/http_ca.crt"

Or you can disable the check which is discouraged using

ssl_certificate_verification => false

1 Like

Thanks @stephenb .
Will try this and report back.

Thank you Stephen. That worked for me.

Which One Worked? Did you get the cert to work?

I copied the cert from the elasticsearch folder and placed it in the logstash folder and added the:

cacert => "\path\to\cert\http_ca.crt"

to my logstash.conf output section.

1 Like

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