Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

monitoring: cadvisor panels don't work at all in docker-compose/pure-docker #17072

Closed
bobheadxi opened this issue Jan 6, 2021 · 2 comments · Fixed by #17096 or sourcegraph/deploy-sourcegraph-docker#213
Assignees
Labels
bug An error, flaw or fault that produces an incorrect or unexpected result, or behavior. docker-compose monitoring

Comments

@bobheadxi
Copy link
Member

bobheadxi commented Jan 6, 2021

in docker-compose, container names are CONTAINER, but the regex matches for _CONTAINER_ because of Kubernetes pods having loads of containers that would report different names (back when it worked anyway). So that means these dashboards don't work at all in all docker-compose/pure-docker environments! oh no. I think this might necessitate a broader rethink of how to tackle naming in cadvisor.

confirmed in managed instances:

image

image

related to https://github.com/sourcegraph/sourcegraph/issues/17069

@bobheadxi
Copy link
Member Author

This should be closed by https://github.com/sourcegraph/sourcegraph/pull/17096. Will test soon

@bobheadxi
Copy link
Member Author

bobheadxi commented Jan 10, 2021

I am was unable to get name to show up in exported cadvisor metrics in both 3.23.0 and the latest insiders (ie after patches in https://github.com/sourcegraph/sourcegraph/issues/17069#issuecomment-755950540). I fenangled with this for a good chunk of time (was worried this might be something wrong with our docker-compose cAdvisor config), which was odd since, since in e.g. devmanaged.sourcegraph.com (a 3.23.0 managed docker-compose instance), the new label matching for Grafana seems to work:

query for devmanaged.sourcegraph.com

image

while locally the same version does not yield any name labels exported by cAdvisor:

image

mid-writeup edit I finally ran across google/cadvisor#1565 and after adding TODO I got everything working (whew):

image

seems good to go. I'm not sure how docker-compose will play into the seeming lack of containerd compatibility noted in #17069 but FWIW I got this working on what seems to be containerd (though I'm not sure - @daxmc99 are you familiar with this?):

❯ docker info | grep runtime
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc

bobheadxi added a commit that referenced this issue Jan 15, 2021
Adds admin and changelog documentation on some recent monitoring changes:

- #17072
- #17069
- #17158
- #17070

Dev docs also show up before admin docs if you search for "grafana" or "prometheus", so adds notices that point back to the admin docs.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug An error, flaw or fault that produces an incorrect or unexpected result, or behavior. docker-compose monitoring
Projects
None yet
2 participants