Logstash Opensearch Configuration havin codec json

I am using opensearch with logstash, I wanted to use codec => json in output section of opensearch configuration. How can I achieve that?

opensearch {
        hosts => ["${OPENSEARCH_HOSTS}"]
        index => "%{logplane}-%{+{{ $date_format }}}"
        http_compression => true
        {{- if $g.security.tls.enabled }}
        ssl => true
        cacert => "/run/secrets/sip-tls-trusted-root-cert/ca.crt"
        keystore => "/opt/logstash/resource/keystore.p12"
        keystore_password => "%%KEYSTORE_PASS%%"
        ssl_certificate_verification => true
        {{- end }}
        manage_template => false
      }

OpenSearch/OpenDistro are AWS run products and differ from the original Elasticsearch and Kibana products that Elastic builds and maintains. You may need to contact them directly for further assistance.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

Opensearch is not supported here, you need to check on an Opensearch forum.

But if the Opensearch output is similar to the Elasticsearch output, then there is no option to change the codec as the codec needs to be and already is json.

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