logstash-plugins / logstash-output-elasticsearch

https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html
Apache License 2.0
219 stars 305 forks source link

SSL settings changed and not documented #1178

Closed itaynvn-runai closed 5 months ago

itaynvn-runai commented 5 months ago

Logstash version: 8.5.1

Description: I've tried to configure SSL settings and found 2 inconsistencies:

  1. The documentation specifies the ssl_enabled option for the plugin, but it is not recognized. placement inlogstash.conf:

    output {
      elasticsearch {
        ssl_enabled => true
      }
    }

    error log:

    [2024-04-15T08:49:14,869][ERROR][logstash.outputs.elasticsearch] Unknown setting 'ssl_enabled' for elasticsearch

    Issue resolved when i changed it to ssl => true.

  2. The documentation specifies the ssl_verification_mode option for the plugin, but it is not recognized. placement inlogstash.conf:

    output {
      elasticsearch {
        ssl_verification_mode => "none"
      }
    }

    error log:

    [2024-04-15T09:08:18,575][ERROR][logstash.outputs.elasticsearch] Unknown setting 'ssl_verification_mode' for elasticsearch

    Issue resolved when i changed it to ssl_certificate_verification => false.

Both of these 'deprecations' hapenned ~1 year ago: PR: https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1118 release notes: https://github.com/logstash-plugins/logstash-output-elasticsearch/blob/81de72e08c5f0d8fad966cb0cdda2e768583020f/CHANGELOG.md?plain=1#L76

so it's either the changes weren't applied properly, or the documentation needs to be updated.

edmocosta commented 5 months ago

Hi @itaynvn-runai 👋!

Thank you for reporting. Logstash 8.5.1 still embeds logstash-output-elasticsearch version 11.9.3, which does not contains the https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1118 changes. It was added only on the plugin version 11.14, released by default with Logstash versions >= v8.8.0.

You can find the docs for that specific version here. If you want, you can also update the plugin to the latest version by running following command:

bin/logstash-plugin update logstash-output-elasticsearch