Logstash 如何将grok模式写入特定单词

Logstash 如何将grok模式写入特定单词,logstash,logstash-grok,Logstash,Logstash Grok,我需要帮助,在编写grok模式的高达特定字符串 我在同一个日志文件中有以下类型的日志行: 第1行: 20151012 00:59:03 main ERROR java.lang.Class - Failed to retrieve the node - unable to resolve the path //mbeans/mbean[@id="audit-config"]/mbean-attributes 第2行: 20151012 00:59:59 RMI TCP Connection(5

我需要帮助,在编写grok模式的高达特定字符串

我在同一个日志文件中有以下类型的日志行:

第1行:

20151012 00:59:03 main ERROR java.lang.Class - Failed to retrieve the node - unable to resolve the path //mbeans/mbean[@id="audit-config"]/mbean-attributes
第2行:

20151012 00:59:59 RMI TCP Connection(5)-176.66.1.39 INFO  net.cp.cluster.configstore.admin.impl.AdminManager - config up-to-date; local anchor [ac6c08e5-cded-43ca-8cb3-e8be1b85c453] - global anchor: [ac6c08e5-cded-43ca-8cb3-e8be1b85c453]
现在,我想在严重性字段中输入日志级别的单词,如ERROR或INFO

我的目标是,我希望秒后字段中的所有内容都在一个字段中出现错误或信息。

我该怎么做

我试过下面的grok,但不起作用:

%{YEAR}%{MONTHNUM}%{MONTHDAY}\s*%{HOUR}:%{MINUTE}:%{SECOND}\s*\(?<rawinfo>/^(?:(?!\s*\b(?:ERROR | ?:INFO)\b).)*/\)

%{YEAR}%{MONTHNUM}%{MONTHDAY}\s*%{HOUR}:%{MINUTE}:%{SECOND}\s*\(?/^(?:(?!\s*\b(?:ERROR |?:INFO)\b.)*/\)
有人帮忙吗


谢谢

%{YEAR}%{MONTHNUM}%{MONTHDAY}%{TIME}%{greedydydata:onefield}%{LOGLEVEL}%{GREEDYDATA:log_message}
是的。。它起作用了。。谢谢。。