devopsprodigy / kubegraf

Grafana-plugin for k8s' monitoring
MIT License
407 stars 45 forks source link

Fix prometheus query for node mem & cpu requests #37

Closed Goginet closed 4 years ago

Goginet commented 4 years ago

Hi, I found bug on Nodes Overview page.

image

The reason of this incorrect prometheus query:

sum(kube_pod_container_resource_requests_cpu_cores) by (node)

This query contains pods which not running now (for example completed jobs)

Solution: Exclude not running pods in query which calculate node mem/cpu requests

SergeiSporyshev commented 4 years ago

Hi, @Goginet Thanks for your PR. We will check it & merge asap