Hi ,
I have some share point log that that i want to use _ingest in order to process them.
its works perfect on the grok debugger but im unable to post it without parsing error
this is the grok pattern (?<parsedtime>%{MONTHNUM}/%{MONTHDAY}/%{YEAR} %{HOUR}:%{MINUTE}:%{SECOND}) \t%{DATA:process} \(%{DATA:processcode}\)(\s*)\t%{DATA:tid}(\s*)\t(?<area>.*)(\s*)\t(?<category>.*)(\s*)\t%{WORD:eventID}(\s*)\t%{WORD:level}(\s*)\t%{DATA:eventmessage}\t%{UUID:CorrelationID}
post it to the server as valid json is a bit tricky ...
so i tried to url encode the data
Any suggestion how to post correctly this pattern ?
the error thrown by the server
"caused_by": {
"type": "json_parse_exception",
"reason": "Illegal unquoted character ((CTRL-CHAR, code 9)): has to be escaped using backslash to be included in string value\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@17e1d17e; line: 12, column: 39]"
}
Timestamp Process TID Area Category EventID Level Message Correlation
09/03/2018 09:14:12.18 w3wp.exe (0x31B4) 0x3F9C SharePoint Foundation Runtime afu6b High [Forced due to logging gap, cached @ 09/03/2018 09:14:12.10, Original Level: VerboseEx] No SPAggregateResourceTally associated with thread.
The escaping was not correct in your pipeline. It's tricky to port patterns developed with Grok debugger to Filebeat. As it's read from a file using Golang slashes need extra escaping.
So your pattern should look like this: (?<parsedtime>%{MONTHNUM}/%{MONTHDAY}/%{YEAR} %{HOUR}:%{MINUTE}:%{SECOND}) \\t%{DATA:process} \\(%{DATA:processcode}\\)(\\s*)\\t%{DATA:tid}(\\s*)\\t(?<area>.*)(\\s*)\\t(?<category>.*)(\\s*)\\t%{WORD:eventID}(\\s*)\\t%{WORD:level}(\\s*)\\t%{DATA:eventmessage}\\t%{UUID:CorrelationID}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.