Skip to content

Cherry-pick #10081 to 6.6: Fix Pod UID automatic enriching#10091

Merged
exekias merged 1 commit intoelastic:6.6from
exekias:backport_10081_6.6
Jan 15, 2019
Merged

Cherry-pick #10081 to 6.6: Fix Pod UID automatic enriching#10091
exekias merged 1 commit intoelastic:6.6from
exekias:backport_10081_6.6

Conversation

@exekias
Copy link
Copy Markdown
Contributor

@exekias exekias commented Jan 15, 2019

Cherry-pick of PR #10081 to 6.6 branch. Original message:

Before this change, Kubernetes Pod events where not being enriched correctly and Pod UID was missing, what caused wrong visualizations in Infrastructure UI.

Metadata was being added at the module level, which is correct
for all metricsets, except pod and state_pod. For these metricsets
metadata must be added at the root level because we are already under
kubernetes.pod. Added metadata was being ignored.

This change takes this special case into account and updates events in
the right place, ensuring the events get the metadata correctly.

Before this change, missing UID caused this:

image

After this change visualizations are correct:

image

* Fix Pod UID automatic enriching

Kubernetes Pod events where not being enriched correctly. Before this
change, metadata was being added at the module level, which is correct
for all metricsets, except `pod` and `state_pod`. For these metricsets
metadata must be added at the root level because we are already under
`kubernetes.pod`. Existing metadata was being ignored.

This change takes this special case into account and updates events in
the right place, ensuring the events get the metadata correctly.

(cherry picked from commit c60282a)
Copy link
Copy Markdown
Contributor

@sayden sayden left a comment

Choose a reason for hiding this comment

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

LGTM

@exekias
Copy link
Copy Markdown
Contributor Author

exekias commented Jan 15, 2019

jenkins, retest this please

@exekias
Copy link
Copy Markdown
Contributor Author

exekias commented Jan 15, 2019

failing tests are unrelated

@exekias exekias merged commit 189aab5 into elastic:6.6 Jan 15, 2019
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
* Fix Pod UID automatic enriching

Kubernetes Pod events where not being enriched correctly. Before this
change, metadata was being added at the module level, which is correct
for all metricsets, except `pod` and `state_pod`. For these metricsets
metadata must be added at the root level because we are already under
`kubernetes.pod`. Existing metadata was being ignored.

This change takes this special case into account and updates events in
the right place, ensuring the events get the metadata correctly.

(cherry picked from commit 0ede7e7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants