-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Metrics always showing zero #1039
Comments
These stats are related to disk metrics. The are is no issue I think |
I'm looking at the Prometheus interface and I'm seeing these stats:
Are these disk metrics? How can I figure out what they are actually reporting? |
Sounds like cAdvisor is having trouble collecting stats. |
Do you guys have an idea what may be causing this? I really just used the default setup and there's nothing fancy about the docker install either (using Docker 1.8 on a Debian on AWS). |
Check the logs. |
Sorry I forgot to mention that, there's about nothing in the logs:
Nothing more than this is shown, Prometheus is pulling every 15 seconds and I forced generating a few HTTP requests as well but the logs stay silent. |
On Fri, Jan 8, 2016 at 1:31 PM, Achille notifications@github.com wrote:
|
Alright, that was confusing, I've got more data now, but there's nothing explicit about memory stats not being read, a bunch of stuff that look like warnings show up tho but I'm too inexperienced with cadvisor to tell what would be giving hints on what's going on. Things that look weird to me, I'm gonna investigate more:
Here are all the logs if someone has some spare cycles to take a look:
|
This is not an issue. This file is distro specific.
This log line sounds like a bug in the code. It should be harmless in any case. The logs you posted is for the setup phase and does not seem to highlight any errors. Are there any more logs that refer to metrics collection after cAdvisor is up logically? Is cAdvisor running in privileged mode? |
Nothing is being logged after starting (which I find strange), but metrics are definitely getting updated, it's being fetched into prometheus and graphed via grafana, all working well except for memory, tasks and IO which are all at zero. And yes, cAdvisor is running as root (in the container):
|
So as far as I understand the memory stats are pulled from this https://github.com/opencontainers/runc/blob/master/libcontainer/cgroups/fs/memory.go#L101 I've scanned the host and container file systems and couldn't find any trace of a It's weird that no error is reported by cAdvisor tho. |
Ah! You need to enable memory cgroup. This is a kernel configuration. On Mon, Jan 11, 2016 at 3:01 PM, Achille notifications@github.com wrote:
|
I'm closing this issue. Feel free to re-open if there are any more concerns. |
I'm wondering if it may be related to this:
I'm gonna set these config options and see if that fixed the issue with memory stats. |
Yep that worked! Adding
And the memory metrics are being reported properly now. Thanks a lot for your help, hopefully this will be useful to someone else as well. |
Thanks @achille-roussel and looks like it's documented officially below. I'm surprised docker-machine doesn't do this grub change automatically, or at least warn that you might want to. |
Updated link to the docker doc above, |
I am having trouble following the links and the comments from above. I am on a Raspberry Pi and running into the issue of my memory metrics not reporting correctly. Would anyone be able to point me in the correct direction (Pi does not use GRUB). Thanks! |
I was also facing this issue using a RaspberryPi, this suggestion fixed it for me (also a reboot was required). |
Hi all, I've just deployed cAdvisor to an existing infra, simply running the default docker image as explained in the README.
Things work just fine but some stats are always showing zero values at the container level (host-level stats have meaningful values), so far:
Is there something I may have to configure? I don't know if those stats should be shown "out-of-the-box".
Thanks for your help!
The text was updated successfully, but these errors were encountered: