Http_compression Set 'compression_level' instead

"http_compression" set in elasticsearch. Deprecated settings will continue to work, but are scheduled for removal from logstash in the future. Set 'compression_level' instead.

Getting error after updating

compression_level expected one of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], got ["true"]

Updated to compression_level => 6

Now it does not like it for http

Unknown setting 'compression_level' for http

You need to provide more context.

You didn't say which version of logstash you are using and you also didn't shared any logstash log.

Please, provide the version of logstash you are using and also share the error log you are getting.

I think I understood your issue.

The elasticsearch output and the http output are different output plugins, even if a setting has the same name it may behave differently.

The fact that you can set compression_level on the elasticsearch output does not mean that this setting exists for the http output.

You need to always check the documentation, for the http output the documentation is here.

As you can see the setting compression_level does not exists for this output, you can enable or disable http_compression, but there is no levels to be changed.

1 Like

I think it's this
The parameter http_compression has been deprecated and should be replaced with the compression_level parameter.

output {
   elasticsearch {
      index => "name"
      hosts => "host"
      compression_level => 8  # before was http_compression => true
....
  }

Yeah, but the compression_level does not exist at all for the http output.

That's the cause of the error:

Now it does not like it for http
Unknown setting 'compression_level' for http

Well, we are wasting time until mdurvesh decode the post. :upside_down_face: