-
Notifications
You must be signed in to change notification settings - Fork 2.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
Export container kernel memory usage to Prometheus #2138
Comments
Why this hasn't seen more movement? :-/ |
It looks like someone tried to implement it, but never finished... |
Anyone looking into this ? if not; |
#2302 was an attempt, but it doesn't look like they got the CLA signed, which means I can't accept it. I don't believe anyone is working on it right now. That PR is a good starting point |
Could anyone review this #3306 ? |
The
container_memory_usage_bytes
metric is already exported. For linux containers, this ultimately comes from the cgroupfsmemory.usage_in_bytes
file. This metric is traditionally documented as being the sum of RSS, cache, and swap memory (memory.stat:rss
,memory.stat:cache
, andmemory.stat:swap
respectively) and these individual components are also already exported to Prometheus ascontainer_memory_rss
,container_memory_cache
andcontainer_memory_swap
.However, on recent kernels (e.g. 4.4+ and probably earlier) when Memory CGroup Kernel Accounting is enabled (the default), the
memory.kmem.usage_in_bytes
value is also added to thememory.usage_in_bytes
aggregate value.At the moment, querying the sum of the
container_memory_rss
,container_memory_cache
andcontainer_memory_swap
metrics does not give the same result as queryingcontainer_memory_usage_bytes
alone, and the difference is most often attributable to the missing kernel memory value exactly (with some small % variation for a small subset of containers).It would be helpful if cadvisor exposed this kernel memory subcomponent to Prometheus just as it already does with the rss, cache, and swap subcomponents so that the breakdown of a container's overall memory usage over time can be better understood.
The text was updated successfully, but these errors were encountered: