-
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
Calculate memory.working_set.limit.pct for pod and container metricset #29547
Calculate memory.working_set.limit.pct for pod and container metricset #29547
Conversation
This pull request does not have a backport label. Could you fix it @MichaelKatsoulis? 🙏
NOTE: |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
Pinging @elastic/integrations (Team:Integrations) |
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.
Lgtm. I see that we have an "inconsistency" in the naming and it is workinset
in container
metricset while it is working_set
in pod
metricset. In any case we cannot do much here without introducing a breaking change 😞 .
@MichaelKatsoulis do you also plan to add it in the package too?
Also @MichaelKatsoulis what do you think about closing #25657 too after this one is merged?
:(
I will open a PR for this as well.
Yes I agree. |
What does this PR do?
This PR calculates and adds
memory.working_set.limit.pct
for kubernetes pod metricset andmemory.workingset.limit.pct
for kubernetes container metricset.The value is calculated as the division of
workingset_bytes/memory_limit
.Why is it important?
The fields
kubernetes.container.memory.usage.limit.pct
andkubernetes.container.memory.usage.node.pct
are useful fields that show the total allocated memory for the container/pod divided with either the limit set by user or the node's total memory.But the total allocated memory also includes buffer and cache bytes which are not actively used and so they are available by other processes. It is useful to provide the
workingset_bytes
of the container/pod divided with the container's limit as a value that shows the actual usage percentage of a container/pod.Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
Run metricbeat on Kubernetes with
container
orpod
metricset enabled and watch the values being populated.Related issues
Screenshots