【问题标题】:Fluentd - Ship log file and preserve it's formatFluentd - 发送日志文件并保留其格式
【发布时间】:2017-03-11 17:18:41
【问题描述】:

无需 Fluentd 执行序列化即可发送日志并保持其格式。

例如,我想发送 apache 日志并将它们存储在远程主机上,而不需要将整体转换为 JSON

我已经检查了文件输出插件here,但我无法得到一个可靠的答案。

【问题讨论】:

    标签: logging fluentd


    【解决方案1】:

    使用single_value 格式。

    Message_key 应该是您要按原样保留的内容。在我这里,它是日志。

    <match *>
    @type file
    <format>
    @type single_value
    message_key log
    </format>
    </match>
    

    【讨论】:

      【解决方案2】:
      猜你喜欢
      • 2015-04-28
      • 1970-01-01
      • 1970-01-01
      • 2020-01-18
      • 1970-01-01
      • 2022-07-07
      • 2015-04-03
      • 1970-01-01
      • 2017-02-27
      相关资源
      最近更新 更多