【问题标题】:Fluentd wildcard out_file with tag in file pathFluentd 通配符 out_file 在文件路径中带有标记
【发布时间】:2014-11-13 06:24:36
【问题描述】:

我刚刚开始使用 fluentd,但我希望能够设置单个输出匹配规则,如下所示:

<match myapp.**>
   type file
   path logs/
   time_slice_format %Y%m%dT%H
   time_slice_wait 5m
   time_format %Y%m%dT%H%M%S%z
</match>

这很好用,但我想找到一种方法来进一步将标签名称添加到输出文件名中;这可能吗?例如,如果我使用myapp.debug 登录,我希望它写入logs/myapp.debug20140918T12_0.log,如果我使用myapp.info 登录,它会写入logs/myapp.info20140918T12_0.log

有没有办法在文件名中添加标签?

【问题讨论】:

    标签: fluentd


    【解决方案1】:

    使用fluent-plugin-forest 插件。

    https://github.com/tagomoris/fluent-plugin-forest

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-06
      • 2013-08-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多