GROK Parsing with regex -
i using following regexes:
int (?:[+-]?(?:[0-9]+)) value ([0-9]+) space \s* data .*? username [a-za-z0-9._-]+ year (?>\d\d){1,2} monthnum (?:0?[1-9]|1[0-2]) monthday (?:(?:0[1-9])|(?:[12][0-9])|(?:3[01])|[1-9]) hour (?:2[0123]|[01]?[0-9]) minute (?:[0-5][0-9]) second (?:(?:[0-5][0-9]|60)) iso8601_timezone (?:z|[+-]%{hour}(?::?%{minute})) timestamp %{year:year}/%{monthnum:monthnum}/%{monthday:monthday}-%{hour:hour}:%{minute:minute}:%{second:second}.%{value:_second} message %{data}err_system%{data} parse_error %{timestamp:ts}%{space}%{username:type1}%{space}%{username:slave}%{space}%{username:type2}%{space}[%{username:fibre1}/username:fibre2]%{space}%{message:message}
now have parse line:
2013/05/13-05:19:16.776 info abcd1 gamereporting
[0000000000000000/00000000000000000000] [gamereportingslaveimpl:0x30bf7699a010].processreport() : error processing report id=18014398509852207, type=frostbite_m, error=err_system
i following after parsing:
type1: info slave : abcd1 type2: gamereportin
now type 2 misses 'g'. why happening?
could provide correct regex above line?
are using grok debugger?
and grok pattern? don't see in post.
i use similar following start off. gave no insight how you'd save data, you'll have add figure out.
%{datestamp}%{space}%{loglevel}%{space}%{word}%{space}%{word}%{space}(?<some_id>\[\d+\/\d+\])
use grok debugger - save lot of time.
Comments
Post a Comment