fluentd无法与我的自定义解析器一起运行:
我的解析器名为dn_multiline_parser
,位于lib/fluent/plugin/parser_dn_log.rb
require 'fluent/plugin/parser'
# default format: "%time [%level] %message"
module Fluent
module Plugin
class DnLogParser < Parser
Plugin.register_parser('dn_multiline_parser', self)
... (parser impl)
end
end
end
fluentd.conf:
<worker 0>
<source>
@type tail
# path /external/core/traces/*/*
tag dn.traces
path /core/dn_gen*
path_key logfile
pos_file /tmp/traces.position.traces
tag dn.traces
rotate_wait 5
read_from_head true
multiline_flush_interval 5s
read_lines_limit 100000
refresh_interval 1
exclude_path ["*.gz","*.zip","*.backup"]
<parse>
@type dn_multiline_parser
time_key dn_timestamp
log_format "%t [%l] %m"
time_length 23
time_format %Y-%m-%d %H:%M:%S
</parse>
</source>
</worker>
... (rest of configuration)
流利的我得到:
2019-12-23 14:32:24 +0000 [错误]:配置错误文件=“ / etc / fluent / fluent.conf” error_class = Fluent :: ConfigError error =“未知的解析器插件'dn_multiline_parser'。运行'gem search -rd fluent-plugin'查找插件”
我尝试过的事情:
有什么想法我做错了吗?