0

我想在fluent-bit中创建一个解析器来解析日志,这些日志被发送到一个弹性搜索实例,但过滤器即使在创建时也无法选择解析器。

以下是日志:

Fluent Bit v1.0.4
Copyright (C) Treasure Data
[2020/07/27 07:06:03] [ info] [storage] initializing...
[2020/07/27 07:06:03] [ info] [storage] in-memory
[2020/07/27 07:06:03] [ info] [storage] normal synchronization mode, checksum disabled
[2020/07/27 07:06:03] [ info] [engine] started (pid=1)
[2020/07/27 07:06:03] [ info] [filter_kube] https=1 host=kubernetes.default.svc port=443
[2020/07/27 07:06:03] [ info] [filter_kube] local POD info OK
[2020/07/27 07:06:03] [ info] [filter_kube] testing connectivity with API server...
[2020/07/27 07:06:03] [ info] [filter_kube] API server connectivity OK
[2020/07/27 07:06:03] [error] [filter_parser] requested parser 'simple_json_with_time' not found
[2020/07/27 07:06:03] [error] [filter_parser] Invalid "parser"
[2020/07/27 07:06:03] [error] Failed initialize filter parser.1

解析器:

            Name        simple_json_with_time
            Format      json
            Time_Key    time
            Time_Format %Y-%m-%d %H:%M:%S,%L
            Time_Keep   On
            Decode_Field_As   escaped_utf8    log    do_next
            Decode_Field_As   json       log
   

筛选:

            Name                parser
            Match               core-test*
            Parser              simple_json_with_time
            Key_Name            log
            Reserve_Data        On
            Preserve_Key        On

不知道为什么它没有选择解析器,有人可以帮我解决上述错误吗?

4

1 回答 1

0

你用的是什么版本的fluentbit,让我们检查一些相关的问题。

在我删除 fluentbit 中定义的自定义解析器 mongodb 后,问题解决了

于 2021-08-27T08:53:38.497 回答