Avro codec pluginedit

  • Plugin version: v3.2.2
  • Released on: 2017-08-15
  • Changelog

Installationedit

For plugins not bundled by default, it is easy to install by running bin/logstash-plugin install logstash-codec-avro. See Working with plugins for more details.

Getting Helpedit

For questions about the plugin, open a topic in the Discuss forums. For bugs or feature requests, open an issue in Github. For the list of Elastic supported plugins, please consult the Elastic Support Matrix.

Descriptionedit

Read serialized Avro records as Logstash events

This plugin is used to serialize Logstash events as Avro datums, as well as deserializing Avro datums into Logstash events.

Encodingedit

This codec is for serializing individual Logstash events as Avro datums that are Avro binary blobs. It does not encode Logstash events into an Avro file.

Decodingedit

This codec is for deserializing individual Avro records. It is not for reading Avro files. Avro files have a unique format that must be handled upon input.

Usageedit

Example usage with Kafka input.

input {
  kafka {
    codec => avro {
        schema_uri => "/tmp/schema.avsc"
    }
  }
}
filter {
  ...
}
output {
  ...
}

Avro Codec Configuration Optionsedit

Setting Input typeRequired

schema_uri

string

Yes

tag_on_failure

boolean

No

 

schema_uriedit

  • This is a required setting.
  • Value type is string
  • There is no default value for this setting.

schema path to fetch the schema from. This can be a http or file scheme URI example:

  • http - http://example.com/schema.avsc
  • file - /path/to/schema.avsc

tag_on_failureedit

  • Value type is boolean
  • Default value is false

tag events with _avroparsefailure when decode fails