logstash - how to write grok pattern upto particular word -
i need in writing grok pattern upto particular string.
i have below types log lines in same log file:
line 1:
20151012 00:59:03 main error java.lang.class - failed retrieve node - unable resolve path //mbeans/mbean[@id="audit-config"]/mbean-attributes
line 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]
here now, want loglevel words error or info severity field.
my goal is, want after seconds field upto error or info in 1 field.
how should that?
i have tried below grok not working:
%{year}%{monthnum}%{monthday}\s*%{hour}:%{minute}:%{second}\s*\(?<rawinfo>/^(?:(?!\s*\b(?:error | ?:info)\b).)*/\)
any here?
thanks!
Comments
Post a Comment