-
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
filebeat panic with json overwrite_keys and elasticsearch output #1378
Comments
Thanks for reporting a 5.0.0-alpha1 bug! I'm affixing the Pioneer Program label to the issue to make you eligible for a gift package! |
Thanks for the Pioneer tag! I'll have to go find my coonskin cap |
tsg
pushed a commit
to tsg/beats
that referenced
this issue
Apr 20, 2016
If `json.keys_under_root` and `json.overwrite_keys` are set, and the keys `@timestamp` or `type` show up in the decoded JSON, they can cause issues because the Elasticsearch output makes some assumptions about them: @timestamp has to be of type `common.Time` and `type` has to be of type `string`. The fix attempts to make use of the `@timestamp` and `type` from the JSON, but if parsing fails or the resulting values are invalid, the fields are not overwritten and an error key is added to help with troubleshooting. Fixes elastic#1378. Also hardens the `getIndex` call in libbeat, to protect against wrong types there as well.
andrewkroh
pushed a commit
that referenced
this issue
Apr 20, 2016
If `json.keys_under_root` and `json.overwrite_keys` are set, and the keys `@timestamp` or `type` show up in the decoded JSON, they can cause issues because the Elasticsearch output makes some assumptions about them: @timestamp has to be of type `common.Time` and `type` has to be of type `string`. The fix attempts to make use of the `@timestamp` and `type` from the JSON, but if parsing fails or the resulting values are invalid, the fields are not overwritten and an error key is added to help with troubleshooting. Fixes #1378. Also hardens the `getIndex` call in libbeat, to protect against wrong types there as well.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm testing the new json support in filebeat 5.0.0-alpha1. I'm having an issue sending json output to elasticsearch with the overwrite_keys option. If overwrite_keys is enabled, the filebeat process crashes. Debug output indicates "panic: interface conversion: interface is string, not common.Time". The source timestamp in my test log entry is "2016-04-05T18:47:18.444Z", which seems to be in the proper format. Both logstash and local file outputs work as expected under the same conditions with the same log. If I disable overwrite_keys, logs are properly sent to elasticsearch and the filebeat process continues to run.
Version: filebeat 5.0.0-alpha1
Operating System: Centos 6.7 64-bit
Steps to Reproduce:
Log entry:
`
debug message:
The text was updated successfully, but these errors were encountered: