【问题标题】:tail inject line number of log?尾注入日志的行号?
【发布时间】:2019-05-10 06:35:24
【问题描述】:

来自a.log

log-line1
logline2

我想在fluentd.conf中添加行号

喜欢

<source>
  @type tail
  path /*
  refresh_interval 1
  pos_file /tmp/access.log.pos
  line_num @line
</source>

源的输出将是

{log:log-line1,line_num:0}
{log:logline2,line_num:1}

【问题讨论】:

    标签: fluentd


    【解决方案1】:

    你不能用 in_tail 插件添加行号。 因为in_tail插件没有这个功能。

    【讨论】:

      猜你喜欢
      • 2013-11-24
      • 1970-01-01
      • 1970-01-01
      • 2019-02-20
      • 2012-11-30
      • 1970-01-01
      • 2013-07-10
      • 2010-10-06
      • 1970-01-01
      相关资源
      最近更新 更多