-
Notifications
You must be signed in to change notification settings - Fork 309
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
Rejected by Elasticsearch [error type]: document_parsing_exception [reason]: '[1:660] failed to parse field [kubernetes.labels.app] of type [text] in document with id #1041
Comments
I think it's related to my kubernetes metadata labels. I have two labels: app and app.kubernetes.io/name. I believe it is being rejected because one is a text type and the other is a nested object so Elasticsearch doesn't know how to handle it. Was there a change in how types or dots are handled past 1.15.0? I didn't see anything in the change log. It works just by rolling back to 1.15.0 from 1.15.1+ so I know it isn't Elasticsearch version. |
This is what the root cause of this issue. For handling this, you need to install ES template to define the field type. |
Same Issue for me, it's prevent me to upgrade to latest version, it used to work and just stopped |
@cosmo0920 Is ES template a plugin? Or are you saying I need to make a template myself? |
You guys need to create and install Elasticsearch mappings by yourself. |
Thanks, I'll give it a shot and report back. |
I wasn't able to get the mapping to work. It says app cannot be changed from text to ObjectMapper.
|
@eli-gc Did you find a working configuration ? |
@xdubois I did not. We decided to move away from Fluentd, but you could try adding the de_dot filter manually or possibly use flattened. De_dot got removed from Fluentd which was the root of my issue. Check out these issues for more info: |
Not sure the one of the solution candidates but Fluentd has dedot filter plugin: https://github.com/lunardial/fluent-plugin-dedot_filter |
Thanks for responses guys |
I have the same issue with the
Even with
|
This is because the pointed field is not keyword i.e. just a within 256 length text. Depending on the automatic mapping caused this issue. |
@cosmo0920 Well, filebeat, which was used before on our deployment, provides label field as Of course, I can tweak mapping on the Elasticsearch side, but that won't solve weird parsing. |
Hmm.., it's weird. Just for my curiosity, isn't it solved by using fluent-bit instead of Fluentd with this plugin? |
@cosmo0920 I deleted mapping for my index to allow all data to come in. |
The error message came from Elasticsearch itself. So, we couldn't display more clearly unfortunately. |
Recently I also have same problem,but I solved it. <filter kubernetes.**>
@type record_transformer
remove_keys $.docker.container_id,$.kubernetes.container_image_id,$.kubernetes.pod_id,$.kubernetes.namespace_id,$.kubernetes.master_url,$.kubernetes.labels.pod-template-hash,$['kubernetes']['labels']['app.kubernetes.io/instance'],$['kubernetes']['labels']['app.kubernetes.io/managed-by'],$['kubernetes']['labels']['app.kubernetes.io/version'],$['kubernetes']['labels']['app.kubernetes.io/name'],$['kubernetes']['labels']['app.kubernetes.io/component'],$['kubernetes']['labels']['app.kubernetes.io/part-of']
</filter> Then,I upgrade fluentd helm package.I hope I can help you. |
@xiaojun90713 so you just deleted the keys? What if I need the data from them? |
|
@xiaojun90713 Thanks for the explanation. I suppose I could try to remove one of the labels that are colliding for me. That might work for me. However, your approach is removing the problem rather than a solution. The caveat is It only works if those labels are not required. |
I am currently still having this issue is there anyone with any fix? |
@cosmo0920 Do you have any support of At this moment many people are struggling with the following error: This fix of replace field name dots with underscore is commonly used to resolve such problems.
|
How about using https://github.com/lunardial/fluent-plugin-dedot_filter plugin? It would be great to add it on your pipeline. |
(check apply)
Problem
I cannot upgrade past 1.15.1 or else I get this error. There is no error in 1.15.0. I did not see any breaking changes in the release notes of fluentd 1.15.1
#0 dump an error event: error_class=Fluent::Plugin::ElasticsearchErrorHandler::ElasticsearchError error="400 - Rejected by Elasticsearch [error type]: document_parsing_exception [reason]: '[1:660] failed to parse field [kubernetes.labels.app] of type [text] in document with id
Steps to replicate
Either clone and modify https://gist.github.com/pitr/9a518e840db58f435911
OR
Provide example config and message
Expected Behavior or What you need to ask
Using Fluentd and ES plugin versions
The text was updated successfully, but these errors were encountered: