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
0.45.0 - cadvisor / malformed metrics #3162
Comments
Had the same issue - and was becoming desperate and pulling my hair. Finally this is my config I came up with and it seems to work with cadvisor v0.46 on a Kubernetes cluster v1.24.8 setup via Rancher.
Now the
this blog https://valyala.medium.com/how-to-use-relabeling-in-prometheus-and-victoriametrics-8b90fc22c4b2 helped a lot to understand how the different |
That helped a little... I now have working container name, but still no
Whereas the kubelet cadvisor does have the pod name:
Did you apply any of the overlays such as |
hmm, strange. not completely sure what's going on here on our systems as the cadvisor-stuff was set up by a colleague who left the company a few weeks ago, left a mess, and I have now to figure out how to fix the prometheus/prometheus-operator setup etc. :| TLDR. I had a look and it seems the cadvisors run with following arguments :D
you see |
I have the same problem on
all results returned from above promQL does not have image field, it's quite strange. |
I have successfully deployed cadvisor 0.45.0 (tried
v0.45.0-containerd-cri
as well) as daemonset on K3S Kubernetes / Containerd. I've only applied thecadvisor-args.yaml
overlay as the others did not seem relevant.History
The bundled K3s (
v1.24.3+k3s1
) containerd is disabled as it does not support ZFS snapshotter. Instead I'm using the containerd from Ubuntu 22.04 (1.5.9-0ubuntu3
) and while it functions perfectly with containers for K3s and ZFS snapshotter, it does not work properly with kubelet / cAdvisor / Prometheus asimage=
andcontainer=
are missing. And a simple Prometheus query such as:Returned an empty set.
What I See Now
It was suggested I try this cadvisor instead, and it is better.. almost but not quiet right. Hopefully I'm just missing something. Now that same Prometheus query returns
111
rows, here is an example for 3:What doesn't seem right:
containers
now equal"cadvisor"
instead of the value specified incontainer_label_io_kubernetes_container_name
namespace
now equal"cadvisor"
instead of the value specified incontainer_label_io_kubernetes_pod_namespace
pods
now equal"cadvisor-tqbj6"
instead of the value specified inid
A Prometheus Query of
container_cpu_usage_seconds_total{image!="",container!="cadvisor"}
returns an empty set.Suggestions?
The text was updated successfully, but these errors were encountered: