-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
Kubernetes pod-level information missing? #225
Comments
I do not have such issue on k8s v1.21.8 using latest helm chart on main branch. |
@mmadoo Thanks for getting back regarding this issue. Could you please show me an example of the full metric line for |
I have for instance a line with There are also some metrics without |
@mmadoo Thank you! I have gotten an idea on what might be the issue (might be related to how K3S works). I am going to presently try re-deploying K3S using the distro provided containerd as opposed to its default embedded containerd. I will try this and get back. |
@mmadoo It seems to be working when launching K3S with the It looks like Scaphandre (obviously) has some expectations wrt the base distribution of Kubernetes. I'd imagine that there's no way for Scaphandre to detect K3S's embedded containerd socket to retrieve pod metadata. So this is definitely not a bug on Scaphandre's side, and is a result of my Kubernetes distribution. |
I just face the same issue. k3s by default do not export Also, the Helm chart does not work on the current default k3s version (v1.25) due to PodSecurityPolicy deprecation. See #246 So for others who want to setup Scaphandre on k3s:
Maybe it should be said in the doc somewhere but I'm not sure where... |
@mickours @reisub0 If the metrics are present but the pod name and namespace labels are missing this is likely a problem mapping the pid to its container ID. This is done using the cgroup file for the process e.g. In my testing I found there were problems with cgroups v2 as the paths in the file are now relative. I noticed this as ubuntu 20.04 works but 22.04 does not. @bpetit I tried adjusting the regular expression but I couldn't get it to work. Not certain but maybe the procfs crate also needs to be upgraded? #250 has a fix for the problem with k8s 1.25. |
Bug description
I have deployed using the Helm chart for Scaphandre - v0.1.0, and looking at the documentation for the Prometheus exporter, I can see that I am supposed to get additional information and metadata about the pods.
However, I noticed that the
scaph_process_power_consumption_microwatts
metrics (as exposed from thescaphandre:8080
service, and accessing from/metrics
port does not contain this information. Specifically, thecontainer_scheduler
is detected and set correctly askubernetes
, but the relevant metrics aboutkubernetes_pod_name
andkubernetes_pod_namespace
are missing!As you can see above, all that it contains is the information about the
cmdline
for the pod as well as the corresponding container id oncontainerd
which is quite obscure and difficult to use.This makes it very difficult to cross-correlate and understand which pod and which namespace is consuming more energy.
Am I doing something wrong in my deployment, or is there a gap in my expectation? Is this a bug on Scaphandre's side?
To Reproduce
monitoring
namespacekubectl port-forward -n monitoring svc/scaphandre 3000:8080
scaph_process_power_consumption_microwatts
metrics are havingcontainer_scheduler
label set askubernetes
but are missingkubernetes_pod_name
labels (like the example given above)Expected behavior
Expected to see the pod metadata information along with the other information like cmdline, pid etc.
Screenshots
Environment
Linux - Debian Bullseye
Deployed on K3S 1.24.6
uname -r
) [e.g. 5.4.0-54-generic]5.10.0-18-amd64
Additional context
There is absolutely no errors or warning logs on the Scaphandre daemonset pods
The text was updated successfully, but these errors were encountered: