Hi everyone,
I have a log file which contains complicated message types. Here is an example:
2016-07-07 13:30:02 [UnzipFile] Before file collection
2016-07-07 13:30:02 [GetZipCol] Start get sorted zip file collection
2016-07-07 13:30:02 [GetZipCol] ProcessDate: 2016-07-07
2016-07-07 13:30:02 [GetZipCol] End get sorted zip file collection
2016-07-07 13:30:02 [Main] [ERROR] No unzip file
The following grok pattern is only suitable for first 4 lines but not last line.
grok{
match => {"message" => ['%{Date:Date}%{SPACE}%{Time:Time}%{SPACE}%{WORD:Job}%{SPACE}%{GREEDYDATA:Message}']}
}
I would like to know how should I modify the grok pattern as to capture[ERROR]
from the last message. Is there anyone know how the way to do this?
Thanks.