我正在使用EFK。
有人可以在这里提供有关如何启用流利的插件的帮助。
我已经安装了以下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
并且正在查看此处安装的宝石列表:
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 [错误]:配置错误文件=“ / etc / fluent / fluent.conf” error_class = Fluent :: ConfigError error =“未知的过滤器插件'concat'。运行'gem search -rd fluent-plugin'查找插件”
2019-08-02 12:46:23 +0000 [错误]:配置错误文件=“ / 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 [错误]:配置错误文件=“ / fluentd / etc / fluent.conf” error_class = Fluent :: ConfigError error =“未知的过滤器插件'record_modifier'。运行'gem search -rd fluent-plugin'查找插件”
答案 0 :(得分:0)
添加到fluentd config @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>