﻿---
title: Fluent codec plugin v3.4.0
description: Plugin version: v3.4.0, Released on: 2021-08-09, Changelog. For other versions, see the overview list. To learn more about Logstash, see the Logstash...
url: https://docs-v3-preview.elastic.dev/elastic/logstash-docs-md/tree/main/vpr/v3-4-0-plugins-codecs-fluent
---

# Fluent codec plugin v3.4.0
- Plugin version: v3.4.0
- Released on: 2021-08-09
- [Changelog](https://github.com/logstash-plugins/logstash-codec-fluent/blob/v3.4.0/CHANGELOG.md)

For other versions, see the [overview list](https://docs-v3-preview.elastic.dev/elastic/logstash-docs-md/tree/main/vpr/codec-fluent-index).
To learn more about Logstash, see the [Logstash Reference](https://www.elastic.co/guide/en/logstash/current/index.html).

## Getting help

For questions about the plugin, open a topic in the [Discuss](http://discuss.elastic.co) forums. For bugs or feature requests, open an issue in [Github](https://github.com/logstash-plugins/logstash-codec-fluent). For the list of Elastic supported plugins, please consult the [Elastic Support Matrix](https://www.elastic.co/support/matrix#matrix_logstash_plugins).

## Description

This codec handles fluentd’s msgpack schema.
For example, you can receive logs from `fluent-logger-ruby` with:
```
    input {
      tcp {
        codec => fluent
        port => 4000
      }
    }
```

And from your ruby code in your own application:
```
    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.

## Fluent Codec configuration options


| Setting                                                                                            | Input type                                                                    | Required |
|----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|----------|
| [`nanosecond_precision`](#v3.4.0-plugins-codecs-fluent-nanosecond_precision)`nanosecond_precision` | [boolean](/elastic/logstash-docs-md/tree/main/lsr/value-types#boolean)boolean | No       |
| [`target`](#v3.4.0-plugins-codecs-fluent-target)`target`                                           | [string](/elastic/logstash-docs-md/tree/main/lsr/value-types#string)string    | No       |


### `nanosecond_precision`

- Value type is [boolean](/elastic/logstash-docs-md/tree/main/lsr/value-types#boolean)
- Default value is `false`

Enables sub-second level precision while encoding events.

### `target`

- Value type is [string](/elastic/logstash-docs-md/tree/main/lsr/value-types#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:
```
    input {
      tcp {
        codec => fluent {
          target => "[logs]"
        }
        port => 4000
      }
    }
```