【问题标题】:How to enable fluentd pluggins如何启用流利的插件
【发布时间】:2019-08-05 14:05:03
【问题描述】:

我正在使用 EFK。

有人可以在此处提供有关如何启用fluentd 插件的帮助。

我已经安装了以下 3 个插件作为我工作的一部分。

gem install fluent-plugin-concat
gem install fluent-plugin-detect-exceptions
gem install fluent-plugin-detect-exceptions-with-error
gem install fluent-plugin-record-modifier

我在这里看到了安装的 gem 列表:

opsmxuser@opsmx-ind-setup:~/docker-compose-efk$ fluent-gem list

*** LOCAL GEMS ***
.
.
fluent-plugin-concat (2.4.0)
fluent-plugin-detect-exceptions (0.0.12)
fluent-plugin-detect-exceptions-with-error (0.0.3)
fluent-plugin-record-modifier (2.0.1)
fluentd (1.6.2, 0.14.25)
.
.

但这 3 个插件没有启用。当我们在fluent.conf 文件中使用这些配置时,会在fluentd 容器日志中获取以下错误消息。

2019-08-05 12:34:55 +0000 [info]: 解析配置文件成功 path="/fluentd/etc/fluent.conf" 2019-08-05 12:34:55 +0000 [error]: config error file="/etc/fluent/fluent.conf" error_class=Fluent::ConfigError error="Unknown filter plugin 'concat'。运行'gem search -rd fluent-plugin' 查找插件"

2019-08-02 12:46:23 +0000 [error]: config error file="/fluentd/etc/fluent.conf" error_class=Fluent::ConfigError error="未知输出插件'detect_exceptions'。运行'gem search -rd fluent-plugin' 查找插件"

2019-08-05 12:34:55 +0000 [info]: 解析配置文件成功 path="/fluentd/etc/fluent.conf" 2019-08-05 12:34:55 +0000 [error]: config error file="/fluentd/etc/fluent.conf" error_class=Fluent::ConfigError error="未知过滤插件'record_modifier'。运行'gem search -rd fluent-plugin' 查找插件"

【问题讨论】:

    标签: java multiline fluentd


    【解决方案1】:

    添加到流利的配置 @type 复制指令。
    下面的例子:

        <match **>
      @type copy
      <store>
        @type exec
        @id load2clickhouse
        command bash /usr/local/bin/insert_ch.sh {{ template "fluentdInsertTable" $ }}
        format json
        <buffer>
          @type memory
          chunk_limit_size 32m
          queue_limit_length 32
          flush_at_shutdown true
          flush_interval 15s
          flush_thread_count 4
        </buffer>
      </store>
      <store>
        @type elasticsearch
        host ip
        port 5044
        logstash_format true
    </store>
    </match>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-24
      • 2017-10-05
      • 1970-01-01
      相关资源
      最近更新 更多