You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm coming from Kubernetes Dashboard and I see a discrepancy in memory reported (double).
The time in the snapshot images is not aligned but I see roughly a double amount of memory reported by Headlamp versus Kubernetes Dashboard and Kubectl
Headlamp:
Kubernetes Dashboard:
Kubectl
kubectl top pod -n monitoring prometheus-kube-x-0
NAME CPU(cores) MEMORY(bytes)
prometheus-kube-x-0 411m 345Mi
In the snapshot above, this is the prometheus pod.
the main container starts itself a image
the pod has 2 containers.
It reports:
1 line for the total it seems
1 line for the image started by prometheus
and 2 lines for each container
The pod has a total of 346714112 (first line) and you can see that this is also seem to be equal roughly to the total of the containers.
The actual query does not filter out the containers memory, making it double?:
memoryQuery={`sum(container_memory_working_set_bytes{namespace='${resource.jsonData.metadata.namespace}',pod=~'${resource.jsonData.metadata.name}'}) by (pod,namespace)`}
I propose to:
filter the containers memory out with the container label.
delete the sum as the name and namespace identifies the pod uniquely ?
This is already the case for the pod CPU query by the way.
cpuQuery={`sum(rate(container_cpu_usage_seconds_total{container!='',namespace='${resource.jsonData.metadata.namespace}',pod='${resource.jsonData.metadata.name}'}[1m])) by (pod,namespace)`}
The text was updated successfully, but these errors were encountered:
Hallo,
I'm coming from Kubernetes Dashboard and I see a discrepancy in memory reported (double).
The time in the snapshot images is not aligned but I see roughly a double amount of memory reported by Headlamp versus Kubernetes Dashboard and Kubectl
Headlamp:
Kubernetes Dashboard:
Kubectl
A pod can have multiple containers and the metrics container_memory_working_set_bytes reports them.
In the snapshot above, this is the prometheus pod.
It reports:
The pod has a total of
346714112
(first line) and you can see that this is also seem to be equal roughly to the total of the containers.The actual query does not filter out the containers memory, making it double?:
I propose to:
container
label.sum
as the name and namespace identifies the pod uniquely ?This is already the case for the pod CPU query by the way.
The text was updated successfully, but these errors were encountered: