Update tls-encryption.asciidoc (#17387) (#17446)

The referenced elasticsearch output plugin has deprecated the options that were specified (`ssl`, `cacert`) https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-deprecated-options

When I tried using the `ssl` option I noticed a warning in the logstash logs:
```
[WARN ][logstash.outputs.elasticsearch] You are using a deprecated config setting "ssl" set in elasticsearch. Deprecated settings will continue to work, but are scheduled for removal from logstash in the future. Set 'ssl_enabled' instead. If you have any questions about this, please visit the #logstash channel on freenode irc.
```

I have updated this document with the suggested new options to use instead.

(cherry picked from commit 3402310b40)

Co-authored-by: Matt Johnson <M@ttJohnson.com>
This commit is contained in:
mergify[bot] 2025-03-31 09:19:22 -04:00 committed by GitHub
parent 23aa7e8fff
commit 7df4c02c09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,21 +3,23 @@
=== Configuring Logstash to use TLS/SSL encryption
If TLS encryption is enabled on an on premise {es} cluster, you need to
configure the `ssl` and `cacert` options in your Logstash `.conf` file:
configure the `ssl_enabled` and `ssl_certificate_authorities` options in your Logstash `.conf` file:
NOTE: See https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html[elasticsearch output plugin documentation] for a full list of options
[source,js]
--------------------------------------------------
output {
elasticsearch {
...
ssl => true
cacert => '/path/to/cert.pem' <1>
ssl_enabled => true
ssl_certificate_authorities => '/path/to/cert.pem' <1>
}
}
--------------------------------------------------
<1> The path to the local `.pem` file that contains the Certificate
Authority's certificate.
NOTE: Hosted {ess} simplifies security. This configuration step is not necessary for hosted Elasticsearch Service on Elastic Cloud.
{ess-leadin-short}