【问题标题】:grok debugger passed but _grokparsefailuregrok 调试器通过但 _grokparsefailure
【发布时间】:2019-07-30 16:47:38
【问题描述】:

这是我的日志

INLFCW1MQ2.enterprisenet.org 11:55:57.818 [main] INFO GeneratorApplication - 应用程序 1 示例日志

这是logstash中的grok模式

filter { grok { match => { "message" => "%{SYSLOGHOST:hostname}\s+%{TIME}\s+\[(?<threadname>[^\]]+)\]\s+%{LOGLEVEL:loglevel}\s+%{GREEDYDATA:message}" } } }

模式在 grok 调试器中传递,但在 logstash 中失败。看到这个帖子后我添加了空格, Grok pattern works in Grok Debugger but not in logstash

【问题讨论】:

    标签: logstash logstash-grok


    【解决方案1】:

    试试这个:

    %{SYSLOGHOST:hostname} %{TIME:time} \[%{WORD:threadname}\] %{LOGLEVEL:loglevel} %{GREEDYDATA:message}
    

    有时我会因为(?而出错

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-29
      相关资源
      最近更新 更多