Hi,
I've tried to read the Logstash docs on grok parsing but i can't find an answer to my issue.
I want to parse a : separated logfile e.g.
29/11/2016 11:49:17 AM : Response: 125 Data connection already open; Transfer starting.
29/11/2016 11:54:18 AM : Response: 226 Transfer complete.
29/11/2016 11:54:18 AM : Command : PWD
If i use the following match statement the hours and minutes from the timestamp are mistakenly parsed as fields.
:%{DATA:log_timestamp}:%{DATA:action}:%{GREEDYDATA:message}
Output from grokconstructor:
MATCHED
log_timestamp 49
action 17·AM·
message ·Response:·125·Data·connection·already·open;·Transfer·starting.
before match: 29/11/2016 11
29/11/2016 11:54:18 AM : Response: 226 Transfer complete.
MATCHED
log_timestamp 54
action 18·AM·
message ·Response:·226·Transfer·complete.
before match: 29/11/2016 11
29/11/2016 11:54:18 AM : Command : PWD
MATCHED
log_timestamp 54
action 18·AM·
message ·Command·:·PWD
before match: 29/11/2016 11
I would like the the following result, what is the best way to do this, is it to create a custom pattern?
log_timestamp 29/11/2016 11:49:17 AM
action Response
message 125 Data connection already open; Transfer starting.
Many thanks,
Scott