-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add a message
field to messages that have a JSON error_key
#3702
Comments
Can you share the config you are using and a line that causes the above issue? This will make it easier to test this potential enhancement. Probably it requires some changes to the json reader. |
The error message is accurate, in that my log files may well contain some malformed JSON. My question is one of finding out what, so I can fix the reporting app. |
@Cylindric Sorry, I think my question above was not clear. Fully agree that there is no issue with the config, it is only easier to have on in the issue already when someone tries to reproduce it + some potential log line you already have which is broken. |
Any line that isn't valid JSON would correctly cause a parse error, I guess.
|
Hi @ruflin , When enabling Input (incorrect) document:
Configuration and output when
Configuration and output when
|
Because the Another odd thing is the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue doesn't have a |
When using FileBeat to ingest records formatted as JSON, it is useful to have the ones that failed to parse logged, which is achieved with the
add_error_key
option.Would it be possible to add the actual line that failed to the document as well? Currently all we have to go on is to search 10Gb/day of log files for a miss-placed comma. There are many commas in a JSON file :)
This would be similar to how Logstash can add the unprocessed "message" field to each document.
It does have the
offset
, but as these files are frequently rotated, it is not easy to find that specific offset in the particular file that has been rotated out.The text was updated successfully, but these errors were encountered: