Sha256: 774428b711ada54b99082b80aa9cb77ce47476f5f3d2533fc660db3d88b6568c

Contents?: true

Size: 1.82 KB

Versions: 87

Compression:

Stored size: 1.82 KB

Contents

# An example config to use filter plugins.
# THIS FEATURE IS SUPPORTED FOR v0.12 AND ABOVE.

# in_forward to generate events to be tested.
# You can send an arbitrary event with an arbitrary tag.
# For example, the following command creates the event
# {"message":"hello world"} with tag = foo
#
# $ echo '{"message":"hello world"}' | fluent-cat foo

<source>
  @type forward
  port 24224
</source>

# For all events with the tag "foo", filter it out
# UNLESS the value of the "message" field matches /keep this/
#
# - {"message":"keep this please"} is kept.
# - {"message":"Do not keep"} is filtered out.
# - {"messag22":"keep this please"} is filtered out.

<filter foo>
  @type grep
  regexp1  message keep this
</filter>

# Matches the events that was kept by the above filter
<match foo>
  @type stdout
</match>

# For all events with the tag "bar", add the machine's hostname with
# the key "hostname" BEFORE forwarding to another instance of Fluentd
# at 123.4.2.4:24224.

<filter bar>
  @type record_transformer
  <record>
    hostname ${hostname}
  </record>
</filter>

# By the time it is getting matched here, the event has
# the "hostname" field.
<match bar>
  @type forward
  <server>
    host 123.4.2.4
    port 24225
  </server>
</match>

# Composing two filters. For all events with the tag foo.bar,
#
# 1. The first filter filters out all events that has the field "hello"
# 2. Then, for those events, we downcase the value of the "name" field.
#
# - {"name":"SADA", "hello":100} gets filtered out
# - {"name":"SADA"} becomes {"name":"sada"}
# - {"last_name":"FURUHASHI"} throws an error because it has no field called "name"

<filter foo.bar>
  @type grep
  exclude1 hello .
</filter>

<filter foo.bar>
  @type record_transformer
  enable_ruby true
  <record>
    name ${name.downcase}
  </record>
</filter>

<match foo.bar>
  @type stdout
</match>

Version data entries

87 entries across 87 versions & 7 rubygems

Version Path
fluent-plugin-nuopenlineage-light-0.1.0 vendor/bundle/ruby/3.3.0/gems/fluentd-1.17.0-x64-mingw-ucrt/example/v0_12_filter.conf
fluentd-1.16.6-x86-mingw32 example/v0_12_filter.conf
fluentd-1.16.6-x64-mingw32 example/v0_12_filter.conf
fluentd-1.16.6-x64-mingw-ucrt example/v0_12_filter.conf
fluentd-1.16.6 example/v0_12_filter.conf
fluentd-1.17.1-x86-mingw32 example/v0_12_filter.conf
fluentd-1.17.1-x64-mingw32 example/v0_12_filter.conf
fluentd-1.17.1-x64-mingw-ucrt example/v0_12_filter.conf
fluentd-1.17.1 example/v0_12_filter.conf
fluent-plugin-openlineage-light-0.1.4 vendor/bundle/ruby/3.3.0/gems/fluentd-1.17.0-x64-mingw-ucrt/example/v0_12_filter.conf
fluent-plugin-openlineage-light-0.1.3 vendor/bundle/ruby/3.3.0/gems/fluentd-1.17.0-x64-mingw-ucrt/example/v0_12_filter.conf
fluent-plugin-openlineage-0.1.0 vendor/bundle/ruby/3.3.0/gems/fluentd-1.17.0-x64-mingw-ucrt/example/v0_12_filter.conf
fluentd-1.17.0-x86-mingw32 example/v0_12_filter.conf
fluentd-1.17.0-x64-mingw-ucrt example/v0_12_filter.conf
fluentd-1.17.0-x64-mingw32 example/v0_12_filter.conf
fluentd-1.17.0 example/v0_12_filter.conf
fluentd-1.16.5-x64-mingw-ucrt example/v0_12_filter.conf
fluentd-1.16.5-x86-mingw32 example/v0_12_filter.conf
fluentd-1.16.5-x64-mingw32 example/v0_12_filter.conf
fluentd-1.16.5 example/v0_12_filter.conf