Type to search.

Fluent codec plugin v3.4.3

Stack

The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

  • Plugin version: v3.4.3
  • Released on: 2024-06-25
  • Changelog

For other versions, see the overview list.

To learn more about Logstash, see the Logstash Reference.

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.

This codec handles fluentd’s msgpack schema.

For example, you can receive logs from fluent-logger-ruby with:

Text
input {
  tcp {
    codec => fluent
    port => 4000
  }
}

And from your ruby code in your own application:

Text
logger = Fluent::Logger::FluentLogger.new(nil, :host => "example.log", :port => 4000)
logger.post("some_tag", { "your" => "data", "here" => "yay!" })

Fluent uses second-precision for events, so you will not see sub-second precision on events processed by this codec.

Setting Input type Required
nanosecond_precision boolean No
target string No
  • Value type is boolean
  • Default value is false

Enables sub-second level precision while encoding events.

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

Define the target field for placing the decoded values. If this setting is not set, data will be stored at the root (top level) of the event.

For example, if you want data to be put under the logs field:

Text
input {
  tcp {
    codec => fluent {
      target => "[logs]"
    }
    port => 4000
  }
}