Reputation: 1
Quite new to grok and struggling to parse the following date time
[170316 03:51:03.102][Columbia.SIMPLY][WS_D_001]
I have tried to parse the first datetime field with the predefined date time patterns without success. The format is YYMMDD HH:MM:SS.
Maybe a custom pattern for this is needed ?
Anyone can help? many thanks!
Upvotes: 0
Views: 777
Reputation: 217254
The following grok pattern will correctly parse your log line:
grok {
match => {"message" => "\[(?<year>\d{2})%{MONTHNUM:month}%{MONTHDAY:day} %{TIME:time}\]\[%{GREEDYDATA:message1}\]\[%{GREEDYDATA:message2}\]"}
}
Upvotes: 1