New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem parsing JSON #2702
Comments
@alvassin it looks like you are attempting to reference the "message" field as the target of your json document during the maybe try:
|
@talevy thanks a lot for your response. This helps, but i also have to make JSON without any newlines/whitespace, otherwise logstash tries to parse line-by-line, not whole json. And i still see Is it possible to pre-filter the whole file to remove all whitespace and newlines, or to ignore them and to recognize json from whole file, not per line? |
Oh, I did not realize that your json was spread out in separate files. For messages that span multiple lines. I suggest taking a look at the multiline codec |
@talevy thanks a lot, i can see my data is loading in json now. |
could you share your solution? @alvassin |
input { tcp { } Add your filters / logstash plugins configuration herefilter { output {
} this is my logstash config file and i am having the same issue. kindly help me o this. [2019-02-18T11:28:04,248][WARN ][logstash.filters.json ] Error parsing json {:source=>"message", :raw=>"<30>Feb 18 16:58:04 nginx[2170]: 172.17.0.1 - - [18/Feb/2019:11:28:04 +0000] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0" "-"", :exception=>#<LogStash::Json::ParserError: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') thanks in advance |
@amiya-elear please open an issue if you want to report a problem. |
I have xunit.json file i want to parse & to use its keys as fields names & values as field values.
I tried a couple examples over internet, but anyway i runs to following problem. Could you please assist?
Xunit looks like the following:
My config:
P.S. I am using latest logstash i've downloaded from website 1.4.2.
The text was updated successfully, but these errors were encountered: