【问题标题】:rewrite-tag filter in fluent-bit 1.6.0 hangs onfluent-bit 1.6.0 中的 rewrite-tag 过滤器挂起
【发布时间】:2020-10-19 10:48:00
【问题描述】:

我用 fluent-bit 1.6.0

尝试了用documentation 编写的rewrite-tag 示例

通过Git 中提到的修复程序,我能够摆脱以下警告

[2020/10/19 15:17:31] [ warn] [input chunk] no matching route for input chunk 16817-1603100851.153798000.flb

但是现在我在输出中什么也没得到。下一行后一直挂着

...
[2020/10/19 15:42:00] [ info] [engine] started (pid=28286)
[2020/10/19 15:42:00] [ info] [storage] version=1.0.6, initializing...
[2020/10/19 15:42:00] [ info] [storage] in-memory
[2020/10/19 15:42:00] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128
[2020/10/19 15:42:00] [ info] [sp] stream processor started

知道这是为什么吗?

以下是配置文件的内容(与文档相同)

[SERVICE]
    Flush     1
    Log_Level info

[INPUT]
    NAME   dummy
    Dummy  {"tool": "fluent", "sub": {"s1": {"s2": "bit"}}}
    Tag    test_tag

[FILTER]
    Name          rewrite_tag
    Match         test_tag
    Rule          $tool ^(fluent)$  from.$TAG.new.$tool.$sub['s1']['s2'].out false
    Emitter_Name  re_emitted

[OUTPUT]
    Name   stdout
    Match  from.*

我将配置文件命名为 example.conf

我的运行方式如下

fluent-bit -c example.conf

【问题讨论】:

  • 向我们展示您的配置和示例日志以及您的预期结果。
  • 我正在使用我已经链接的rewrite-tag 文档中给出的相同示例配置内容。在那里 INPUT 使用dummy,您可以在我的问题内容中看到输出。
  • 如果在stdout 输出中您在Match 部分使用* 怎么办?有输出吗?标签是什么?
  • 相同的结果,没有额外的输出。挂在同一个位置。
  • 似乎我们在Github 中打开了问题。我想知道这是否仅与macOS有关

标签: filter fluent-bit fluent-bit-rewrite-tag


【解决方案1】:

有一个已知的回归,请升级到 v1.6.1:

$ ../../build/bin/fluent-bit -c conf 
Fluent Bit v1.6.1
* Copyright (C) 2019-2020 The Fluent Bit Authors
* Copyright (C) 2015-2018 Treasure Data
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

[2020/10/19 12:25:49] [ info] [engine] started (pid=1830124)
[2020/10/19 12:25:49] [ info] [storage] version=1.0.6, initializing...
[2020/10/19 12:25:49] [ info] [storage] in-memory
[2020/10/19 12:25:49] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128
[2020/10/19 12:25:49] [ info] [sp] stream processor started
[0] from.test_tag.new.fluent.bit.out: [1603131950.103238001, {"tool"=>"fluent", "sub"=>{"s1"=>{"s2"=>"bit"}}}]
[0] from.test_tag.new.fluent.bit.out: [1603131951.102535915, {"tool"=>"fluent", "sub"=>{"s1"=>{"s2"=>"bit"}}}]

【讨论】:

  • 也尝试了 1.6.1 版本。还是同样的问题。这rewrite-tag 功能不是与 macOS Catalina (Version 10.15.7) 不兼容吗?
  • 可以确认此问题与 macOS 有关。因为我尝试使用 Ubuntu VM (20.04.1) 并且这有效。 @edsiper 很高兴我们也可以修复 macOS。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2011-11-16
  • 1970-01-01
  • 2021-03-05
  • 2021-12-21
  • 1970-01-01
  • 2016-09-08
  • 2023-02-04
相关资源
最近更新 更多