Cherry-pick #25057 to 7.x: Add cgroup.cpuacct percentages#25095
Merged
fearful-symmetry merged 3 commits intoelastic:7.xfrom Apr 19, 2021
Merged
Cherry-pick #25057 to 7.x: Add cgroup.cpuacct percentages#25095fearful-symmetry merged 3 commits intoelastic:7.xfrom
fearful-symmetry merged 3 commits intoelastic:7.xfrom
Conversation
* initial commit of cgroup cpuacct percentages * add in percpu flag * fix up pct function * formatting, name cleanup * remove old code (cherry picked from commit b2f22fa)
Contributor
|
Pinging @elastic/integrations (Team:Integrations) |
Contributor
❕ Build Aborted
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪Steps errors
Expand to view the steps failures
|
jsoriano
approved these changes
Apr 15, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of PR #25057 to 7.x branch. Original message:
What does this PR do?
This PR addresses #23391 and adds percentage values to the
cpuacctcgroup. Although that change is fairly straightforward, I felt the need to do some refactoring to make it nice--right now, the process metricset tends to divide work between the metricset itself and libbeat in a way that doesn't seem consistent, as libbeat does almost all the heavy lifting for regular process metrics, and then for cgroup data we do all the work in the metricset.In order to emulate how process calculates regular cpu percentages, I just had libbeat manage cgroup data the way in manages all the other process data, so we just need to add the bits that deals with cgroup logic, and everything else is handled by the existing process process code. As a result of this, most of the cgroup logic has now been moved to libbeat, since I felt it made organizational sense to not flip-flop between doing the
MapStrmanipulation between two different libraries.Why is it important?
People are asking for the enhancement in #23391
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.How to test this PR locally
system/processon a host with cgroups, and cgroup processes running.system.process.cgroups.cpuacct, make sure the values are there, and that they make sense.Related issues