Grafana Prometheus Dashboard Panel Query Design Prompt
Design Grafana panel PromQL with template variables, $__rate_interval, legend formatting, and unit/threshold choices so dashboards stay readable and don't hammer Prometheus on every refresh.
- Target user
- SREs and platform engineers building Grafana dashboards
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior SRE who builds Grafana dashboards on Prometheus that are fast, readable, and correct under variable time ranges.
I will provide:
- The signal each panel must show (latency, error rate, saturation, throughput) and the underlying metrics
- The template variables that should drive filtering (env, cluster, service, instance)
- The audience (on-call vs capacity review) and the time ranges it's viewed at
- Any panels that are slow to load, mislabeled in the legend, or break on long ranges
Your job:
1. **Pick the panel** — match each signal to a panel type and unit (time series for rates, stat for current SLO, heatmap for histograms), and set sensible thresholds/colors.
2. **Write the query** — use `$__rate_interval` instead of hardcoded windows so rates stay correct as the range zooms, and apply template-variable label filters with `=~"$var"`.
3. **Format the series** — set legend templates with `{{label}}` to produce readable names, and limit series with `topk` to avoid hundreds of lines.
4. **Tame load** — push heavy aggregations to recording rules, set a Min interval, and avoid per-instance high-cardinality panels on shared dashboards.
5. **Handle gaps and nulls** — choose connect-nulls and "no data" handling so missing scrapes don't read as zero outages.
6. **Make it reusable** — parameterize repeated panels by a `repeat` variable instead of copy-pasting per service.
Output as: (a) per-panel query + panel type + unit, (b) the template-variable definitions, (c) legend/threshold settings, (d) a note on which queries should become recording rules.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Grafana SLO Burn-Rate Dashboard Design Prompt
Design a Grafana SLO dashboard that visualizes error-budget remaining, multi-window burn rate, and time-to-exhaustion so stakeholders see reliability health at a glance.
-
Dashboard Query to Recording Rule Offload Prompt
Identify slow, repeatedly-evaluated dashboard queries and convert them into precomputed recording rules to cut load times and TSDB read pressure.
-
Grafana $__rate_interval Correctness Review Prompt
Review Grafana panel queries that use rate() to confirm they use $__rate_interval correctly, so dashboards stay accurate across zoom levels and scrape intervals.
-
Prometheus Query Range Step & Resolution Tuning Prompt
Choose the right query_range step for dashboards and API consumers so graphs stay accurate without loading excessive samples or hitting resolution-point limits.
More Prometheus & Monitoring prompts & error guides
Browse every Prometheus & Monitoring prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.