Skip to content
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 .* to kubernetes labels and annotations in fields.yml mapping #13226

Merged
merged 6 commits into from
Aug 16, 2019
Merged

Add .* to kubernetes labels and annotations in fields.yml mapping #13226

merged 6 commits into from
Aug 16, 2019

Conversation

kaiyan-sheng
Copy link
Contributor

This PR is to fix mapping for kubernetes.labels and kubernetes.annotations in fields.yml. The error message is caused by this look like:

{"type":"mapper_parsing_exception","reason":"object mapping for [kubernetes.labels.app] tried to parse field [app] as object, but found a concrete value"}

closes #12638

Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that .* was appended if needed but it seems that it isn't.

I am ok with adding the wildcard explicitly in any case, once tests pass.

@kaiyan-sheng
Copy link
Contributor Author

@jsoriano Thanks! What do you think about backporting this?

@kaiyan-sheng kaiyan-sheng merged commit 2e4d292 into elastic:master Aug 16, 2019
@kaiyan-sheng kaiyan-sheng deleted the k8s_label branch August 16, 2019 18:11
@jsoriano
Copy link
Member

@jsoriano Thanks! What do you think about backporting this?

It can be a good idea, it will surely do more good than harm.

kaiyan-sheng added a commit that referenced this pull request Aug 27, 2019
…13226) (#13284)

* Update labels and annotations object field

(cherry picked from commit 2e4d292)
kaiyan-sheng added a commit that referenced this pull request Aug 27, 2019
…13226) (#13287)

* Update labels and annotations object field

(cherry picked from commit 2e4d292)
@glaenen
Copy link

glaenen commented Mar 12, 2020

Still seeing this issue with Metricbeat 7.6.0

{"type":"mapper_parsing_exception","reason":"failed to parse field [kubernetes.labels.statefulset] of type [keyword] in document with id 'HPFwzXABACATvuNpI5wp'. Preview of field's value: '{kubernetes={io/pod-name=elastic-es-hot-0}}'","caused_by":{"type":"illegal_state_exception","reason":"Can't get text on a START_OBJECT at 1:122"}}

@jsoriano
Copy link
Member

Still seeing this issue with Metricbeat 7.6.0

{"type":"mapper_parsing_exception","reason":"failed to parse field [kubernetes.labels.statefulset] of type [keyword] in document with id 'HPFwzXABACATvuNpI5wp'. Preview of field's value: '{kubernetes={io/pod-name=elastic-es-hot-0}}'","caused_by":{"type":"illegal_state_exception","reason":"Can't get text on a START_OBJECT at 1:122"}}

This issue should be fixed by #16834, that will be released in 7.6.2.

leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…lastic#13226) (elastic#13284)

* Update labels and annotations object field

(cherry picked from commit b89ac5e)
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…lastic#13226) (elastic#13287)

* Update labels and annotations object field

(cherry picked from commit b89ac5e)
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…annotations in fields.yml mapping (elastic#13283)

* Add `.*` to kubernetes labels and annotations in fields.yml mapping  (elastic#13226)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libbeat review Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[metribeat] Failed to parse kubernetes.labels.app
3 participants