devopsprodigy / kubegraf

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

kube-state-metrics kube_pod_container_resource_limits query changed #58

Closed BBQigniter closed 3 years ago

BBQigniter commented 3 years ago

Hi,

not sure if this was already reported - I searched the issues but couldn't find anything.

with kube-state-metrics v2.0.0 it seems they changed how resource limits and requests values are queried.

The following metrics were removed if I saw that correctly:

Instead they now have

where you can query the values via labels e.g. ...{resource="memory"}

The panels "Memory Usage" and "CPU usage" have to be updated. I tried with following for example for the "Memory Usage"-panel on the "Deployment's Dashboard"

sum (kube_pod_container_resource_requests_memory_bytes{ namespace="$namespace", pod=~"$pod", container=~"$container"}) by (pod, container) or sum (kube_pod_container_resource_requests{ namespace="$namespace", pod=~"$pod", container=~"$container", resource="memory"}) by (pod, container) 
BBQigniter commented 3 years ago

sorry, i knew it that this is familiar to me - now I found the issue where it stated that it should already be fixed - https://github.com/devopsprodigy/kubegraf/issues/55

now i wonder - why those dashboards didn't get the update :| on our grafana instance

BBQigniter commented 3 years ago

must have missed to re-import the dashboards after the update