Fluentd - 传送日志文件并保留其格式
Fluentd - Ship log file and preserve it's format
无需 Fluentd 执行序列化即可传送日志并维护其格式。
例如,我想发送 apache 日志并将它们存储在远程主机上,而不会将整个日志转换为 JSON
我检查了文件输出插件 here 但我无法得到可靠的答案。
你可以通过none解析器和single_value格式实现。
http://docs.fluentd.org/articles/parser-plugin-overview#list-of-built-in-parsers
http://docs.fluentd.org/articles/formatter-plugin-overview#list-of-built-in-formatters
使用 single_value
格式。
Message_key 应该是您想要保留的内容。在我这里,它是日志。
<match *>
@type file
<format>
@type single_value
message_key log
</format>
</match>
无需 Fluentd 执行序列化即可传送日志并维护其格式。
例如,我想发送 apache 日志并将它们存储在远程主机上,而不会将整个日志转换为 JSON
我检查了文件输出插件 here 但我无法得到可靠的答案。
你可以通过none解析器和single_value格式实现。
http://docs.fluentd.org/articles/parser-plugin-overview#list-of-built-in-parsers http://docs.fluentd.org/articles/formatter-plugin-overview#list-of-built-in-formatters
使用 single_value
格式。
Message_key 应该是您想要保留的内容。在我这里,它是日志。
<match *>
@type file
<format>
@type single_value
message_key log
</format>
</match>