使用filebeat解析log4j HTMLLayout日志文件

时间:2017-08-03 10:55:18

标签: log4j elastic-stack

我是ELK Stack的新手,可能是我的approuch错了。 我试图通过filebeat> logstash

将我的日志导入Elasticsearch

日志文件保存为[Date] log.html。 看起来像这样(图片从stackoverflow线程复制):HTMLLayout Log4j picture example 我能够阅读[Date] log.html并通过Kibana查看它。 但它的显示方式很糟糕。所有HTML标签也会显示。

我想将其解析为如上图链接所示的标题: - 时间 - 线程 - 等级 - 类别 - 消息

我在filebeat.prospectors下的filebeat.yml中尝试此操作但没有成功。

提前感谢您的帮助。

祝你好运

编辑:

我的filebeat.yml(尝试和错误)

filebeat.prospectors:

- input_type: log

  # Paths that should be crawled and fetched. Glob based paths.
  paths:
    - c:\MyDir\log.html
  multiline:
        pattern: '^[[:space:]]'
        negate: false
        match: after  


#----------------------------- Logstash output --------------------------------
output.logstash:
  # The Logstash hosts
  hosts: ["localhost:5044"]

0 个答案:

没有答案
相关问题