Closed lcharbon closed 4 years ago
You need to use double backlash in your pattern...
%{TIMESTAMP_ISO8601:timestamp}%{SPACE}%{WORD:severity}%{SPACE}%{WORD:component}%{SPACE}\\[%{DATA:context}\\]%{SPACE}%{GREEDYDATA:message}
...
{ timestamp: "2019-12-10T17:20:54.504-0500",
severity: "I",
component: 'COMMAND',
context: "conn949",
message: "..." }
Using the below pattern:
To parse the below string:
and grok-js returns
null
. However when I remove the\[
and\]
the string is parsed but the context variable is not. Is there something wrong with my pattern or is this a bug?