-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Fix issue with incorrect policy response attachment. #113430
Conversation
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great thanks. The context writeup on this issue is superlative as well, great for context about how this particularly complicated telemetry document is assembled.
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Test FailuresKibana Pipeline / general / Allows the rule to be duplicated from the edit screen.indicator match Detection rules, Indicator Match Duplicates the indicator rule Allows the rule to be duplicated from the edit screenStack Trace
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @pjhampton |
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
This is a tricky PR to explain - the (sometimes) incorrect policy response has been being attached for 7.14.0 + 7.15.0 Endpoints.
Background
An EP telemetry document is built of 4 parts:
To get all this information we have to.
The reason for this complexity is that there is no policy config reference in the EP Metrics document. To get this to work I look up all the agent policies and look up the EP package policies. The original assumption aggregated the policy document from the
.ds-metrics-endpoint.policy*
datastream on the policy id"terms": { "field": "Endpoint.policy.applied.id" }
However, this was a poor assumption. The reason for this is the policy config is applied to a fleet of endpoints, rather than a specific endpoint. The above has been changed to aggregate on the Endpoint ID
"terms": { "field": "agent.id" }
which conveniently is present on the policy response document.Checklist
For maintainers