dotdc / grafana-dashboards-kubernetes

A set of modern Grafana dashboards for Kubernetes.
Apache License 2.0
2.56k stars 365 forks source link

[bug] Why no data in CPU / Memory usage? #121

Open k-szortyka opened 2 weeks ago

k-szortyka commented 2 weeks ago

Describe the bug

I don't have metrics for Namespace(s) usage on total cluster CPU/Memory in % and Memory / CPU usage by Pod, I have changed image="" with image!="" and it not resolve the issue.

sum(rate(container_cpu_usage_seconds_total{namespace=~"$namespace", image!="", pod=~"${created_by}.*", cluster="$cluster"}[$__rate_interval])) by (pod)

image

The same with Namespace(s) usage on total cluster CPU in % image

How to reproduce?

No response

Expected behavior

I would like to have metrics of usage CPU and memory of cluster.

Additional context

No response

dotdc commented 1 week ago

Hi @k-szortyka, Do you have any series when looking at raw container_cpu_usage_seconds_total in Grafana explore ? Can you give more information: Kubernetes distribution, Kubernetes version, deployment method/chart...

k-szortyka commented 1 week ago

@dotdc I have any series but I can't filter by cluster or namespace which is crucial. image I use AWS EKS with the following version: 1.29 and kube-metrics 2.11.

dotdc commented 1 week ago

Do you have the machine_cpu_cores metric ? Did you install node_exporter (helm chart) ?

k-szortyka commented 1 week ago

@dotdc Yes I have but without cluster and namespace filters.

image

I don't have node_exporter. I'm using kube-state-metrics and metrics-server.

dotdc commented 1 week ago

@k-szortyka non-existing label shouldn't be an issue. Can you try with node-exporter ?

xsoheilalizadeh commented 4 days ago

@k-szortyka are you running this on minikube/docker environment?