如何解析fluentd中输入的多行java错误/异常堆栈跟踪(我应该通过Kibana看到相同的错误/异常堆栈跟踪)

如何解析fluentd中输入的多行java错误/异常堆栈跟踪(我应该通过Kibana看到相同的错误/异常堆栈跟踪),java,multiline,fluentd,Java,Multiline,Fluentd,我正在使用EFK 这里有人可以帮助我如何通过fluentd解析多行java堆栈跟踪,以便在日志消息字段中推送整个stacktrace(我应该通过Kibana看到相同的错误/异常stacktrace) 我需要分析以下错误堆栈跟踪: 我的fluent.conf文件配置如下: 使用上述配置时,fluentd容器日志中出现以下错误: 确保已安装插件。 您可以使用以下命令安装它 gem install fluent-plugin-detect-exceptions 我在我的代理上使用以下配置。注意

我正在使用EFK

这里有人可以帮助我如何通过fluentd解析多行java堆栈跟踪,以便在日志消息字段中推送整个stacktrace(我应该通过Kibana看到相同的错误/异常stacktrace)

我需要分析以下错误堆栈跟踪:
我的fluent.conf文件配置如下:
使用上述配置时,fluentd容器日志中出现以下错误:

确保已安装插件。 您可以使用以下命令安装它

gem install fluent-plugin-detect-exceptions 
我在我的代理上使用以下配置。注意,在检查消息是否为堆栈跟踪之前,我使用fluent插件重写标记过滤器进行了重新标记

<match tag>
  @type                       rewrite_tag_filter
  <rule>
    key                       container_id
    pattern                   /(.+)/
    tag                       removeme.${tag}.$1
  </rule>
</match>

<match removeme**>
  @type detect_exceptions
  remove_tag_prefix           removeme
  message                     message
  languages                   java, python
  multiline_flush_interval    1
</match>

<match tag_without_prefix**>
  @type                       elasticsearch
  host                        elasticsearch
  port                        9200
  logstash_format             true
  ...
</match>

@类型重写\标记\过滤器
密钥容器id
模式/(.+)/
标记移除名称。${tag}.$1
@类型检测\u异常
删除\标记\前缀删除我
消息消息
语言java、python
多行\u刷新\u间隔1
@类型弹性搜索
主机弹性搜索
端口9200
logstash_格式为true
...
也可以使用本例中的@label参数:

fluent-plugin-detect-exceptions-with-error-0.0.3
fluent-plugin-detect-exceptions-0.0.12
fluent-plugin-concat-2.4.0
2019-08-02 12:46:23 +0000 [error]: config error file="/fluentd/etc/fluent.conf" error_class=Fluent::ConfigError error="Unknown output plugin 'detect_exceptions'. Run 'gem search -rd fluent-plugin' to find plugins"
gem install fluent-plugin-detect-exceptions 
<match tag>
  @type                       rewrite_tag_filter
  <rule>
    key                       container_id
    pattern                   /(.+)/
    tag                       removeme.${tag}.$1
  </rule>
</match>

<match removeme**>
  @type detect_exceptions
  remove_tag_prefix           removeme
  message                     message
  languages                   java, python
  multiline_flush_interval    1
</match>

<match tag_without_prefix**>
  @type                       elasticsearch
  host                        elasticsearch
  port                        9200
  logstash_format             true
  ...
</match>