copy

The
copy
output plugin copies events to multiple outputs.out_copy
is included in Fluentd's core. No additional installation process is required.<match pattern>
@type copy
<store>
@type file
path /var/log/fluent/myapp1
...
</store>
<store>
...
</store>
<store>
...
</store>
</match>
<match myevent.file_and_mongo>
@type copy
<store>
@type file
path /var/log/fluent/myapp
time_slice_format %Y%m%d
time_slice_wait 10m
time_format %Y%m%dT%H%M%S%z
compress gzip
utc
</store>
<store>
@type mongo
host fluentd
port 27017
database fluentd
collection test
</store>
</match>
The value must be
copy
.out_copy
shares a record between store
plugins by default.When
deep_copy
is true, out_copy
passes different record to each store
plugin.Specifies the storage destinations. The format is the same as the \ directive.
The
log_level
option allows the user to set different levels of logging for each plugin. The supported log levels are: fatal
, error
, warn
, info
, debug
, and trace
.If one
store
raises an error, it affects other <store>
. If you want to ignore an exception from less important <store>
, you can use 3rd party out_copy_ex instead.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 modified 3yr ago