Cherry-pick #21113 to 7.x: libbeat/cmd/instance: report cgroup stats#21334
Cherry-pick #21113 to 7.x: libbeat/cmd/instance: report cgroup stats#21334axw merged 2 commits intoelastic:7.xfrom
Conversation
* libbeat/cmd/instance: report cgroup stats (cherry picked from commit b4c7a93)
|
Pinging @elastic/integrations (Team:Integrations) |
💔 Tests FailedExpand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
Gosigar's cgroups GetStatsForProcesses can return a nil Stats pointer and no error when the ["blkio", "cpu", "cpuacct", "memory"] subsystems are on the root cgroup. Related elastic#21113
|
Thanks @adriansr, I've cherry-picked your commit. |
Cherry-pick of PR #21113 to 7.x branch. Original message:
What does this PR do?
Report cgroup limits/stats on Linux, similar to what Elasticsearch reports through node stats: https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html
Metric names are based on (but not exactly the same as) the
system.process.cgroup.*fields.Why is it important?
This is important for reporting accurate resource usage in containerised environments.
Checklist
- [ ] I have commented my code, particularly in hard-to-understand areas- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration files- [ ] I have added tests that prove my fix is effective or that my feature works- [ ] I have added an entry inCHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.I couldn't see docs or tests to update - please point me to them if there are any.
How to test this PR locally
Related issues
Closes #14691