Versions | v1.0 (td-agent3)

Inject section configurations

Table of Contents

Inject section overview

Inject section can be in <match> or <filter> sections. It’s enabled for plugins which support injecting values to the event record.

  @type file
  # parameters for output plugin
    # inject section parameters


Here is an example of configuration and event:

# Configuration example
  time_key fluentd_time
  time_type string
  time_format %Y-%m-%dT%H:%M:%S.%NZ
  tag_key fluentd_tag

# Record example
tag: test
time: 1547575563.952259
record: {"message":"hello"}

Injected record is below:


inject section parameter

Inject parameters

  • hostname_key (string) (optional): the field name to inject hostname
    • Default: nil
  • hostname (string) (optional): hostname value
    • Default: Socket.gethostname
  • worker_id_key (string) (optional): the field name to inject worker_id
    • Default: nil
  • tag_key (string) (optional): the field name to inject tag
    • Default: nil
  • time_key (string) (optional): the field name to inject time
    • Default: nil

INCLUDE: _time_parameters

Last updated: 2019-02-19 17:01:59 +0000

Versions | v1.0 (td-agent3)

If this article is incorrect or outdated, or omits critical information, please let us know. Fluentd is a open source project under Cloud Native Computing Foundation (CNCF). All components are available under the Apache 2 License.