A Grafana variable dropdown takes 30 seconds to load. How do you fix it?
BeginnerScenarioGrafana, Dashboards and Kubernetes Monitoring
Answer
Situation read → The variable query scans all series.
What I'd do →
- Replace
label_values(pod)with a scoped query:label_values(kube_pod_info{namespace="$namespace"}, pod). - Chain variables (cluster → namespace → pod).
- Set refresh to "On dashboard load" instead of "On time range change".
- Use a small metric (e.g.
kube_pod_info) rather than a high-cardinality one.
Why → Variable queries run against the series index; scoping them reduces work.
Interview tip → Small, well-chosen "info" metrics make the best variable sources.
More on Grafana, Dashboards and Kubernetes Monitoring
Grafana has 900 dashboards and nobody can find anything. How do you clean it up?IntermediateHow do you manage Grafana dashboards as code?IntermediateDesign a service overview dashboard that an on-call engineer can read in 10 seconds.BeginnerYou need to show deploy events on every Grafana graph. How?BeginnerPods are being OOMKilled but the memory graph never reaches the limit. Why?IntermediateHow do you detect CPU throttling hurting latency in Kubernetes?Intermediate