Routing Examples
This article shows typical routing examples.
Simple Input -> Filter -> Output
<source>
@type forward
</source>
<filter app.**>
@type record_transformer
<record>
hostname "#{Socket.gethostname}"
</record>
</filter>
<match app.**>
@type file
# ...
</match>Two input cases
If you want to separate data pipeline for each sources, use Label.
Input -> Filter -> Output with Label
Label reduces complex tag handling by separating data pipeline.
Re-route event by tag
Use fluent-plugin-route plugin. route plugin rewrites tag and re-emit events to other match or Label.
Re-route event by record content
Use fluent-plugin-rewrite-tag-filter.
See also out_rewrite_tag_filter article.
Re-route event to other Label
Use out_relabel plugin. relabel plugin simply emits events to Label. No tag rewrite.
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.
Last updated
Was this helpful?