Grafana Dashboard JSON Model Review Prompt
Audit a Grafana dashboard's raw JSON model for portability, performance, and correctness — datasource references, variable wiring, refresh, and hidden anti-patterns.
- Target user
- Platform and observability engineers reviewing dashboards before they ship
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT, Cursor
The prompt
You are a senior observability engineer who reviews the raw JSON model of a Grafana dashboard and finds the portability, performance, and correctness problems that don't show in the UI.
I will paste the dashboard JSON (or its key fields). Review it for:
1. **Datasource references**: every panel/target and template variable must use a `${datasource}` variable or a UID that exists in the target instance — flag hardcoded UIDs, `null` datasources defaulting to the wrong source, and mixed-datasource panels that won't resolve on import.
2. **Template variables**: check `refresh` (on load vs on time change), `regex`/`includeAll`/`allValue`, chained `query` variables, and any variable that is unused or references a missing datasource.
3. **Refresh & time**: flag a dashboard-level `refresh` set too aggressively (e.g. `5s` on an expensive board), a huge default `time.from`, and `maxDataPoints`/`interval` settings that force over- or under-sampling.
4. **Query cost**: spot high-cardinality `group by`, missing `$__rate_interval`, per-panel repeated heavy subqueries that should be recording rules, and legacy `angular` panels.
5. **Panel hygiene**: duplicate panel `id`s, orphaned panels off the grid, missing units/thresholds, and hardcoded org/folder assumptions.
6. **Portability**: confirm the JSON has no environment-specific literals (URLs, UIDs, org IDs) so it imports cleanly elsewhere.
Output a prioritized findings list (blocker / warning / nit) with the exact JSON path and the fix.
Mark DESTRUCTIVE: none — this is a review only.
---
Dashboard JSON: [PASTE]
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Why this prompt works
Most dashboard problems — broken imports, expensive refreshes, unresolved datasources — are invisible in the rendered UI and only show in the JSON model. This prompt reviews the raw model against a concrete checklist: datasource variables, template refresh, query cost, and panel hygiene, and returns prioritized findings with the exact JSON path to fix.
How to use it
- Paste the raw JSON, not a screenshot, so model-only issues surface.
- Name the target instances so portability findings are grounded.
- Act on blockers before import — especially hardcoded UIDs and aggressive refresh.
- Re-run after edits to confirm findings are cleared.
Useful commands
# Export a dashboard's JSON model for review
curl -s -H "Authorization: Bearer $GRAFANA_TOKEN" \
http://localhost:3000/api/dashboards/uid/$UID | jq '.dashboard' > dash.json
# Quick scan for hardcoded datasource UIDs and duplicate panel ids
jq '[.. | .datasource? | select(type=="object") | .uid] | unique' dash.json
jq '[.panels[].id] | group_by(.) | map(select(length>1))' dash.json
Example config
A portable datasource reference (variable, not hardcoded):
{
"templating": {
"list": [
{ "name": "datasource", "type": "datasource", "query": "prometheus" }
]
},
"panels": [
{ "datasource": { "type": "prometheus", "uid": "${datasource}" } }
]
}
Common findings this catches
- Broken import → hardcoded datasource UID instead of
${datasource}. - Datasource hammering → dashboard
refreshtoo aggressive. - Limit-tripping queries →
includeAllwith.*allValue. - Under-sampled rates → missing
$__rate_interval. - Corrupt links/repeats → duplicate panel
ids.
When to escalate
- Recording-rule offloading for heavy panels — the metrics platform team.
- Dashboard standards enforcement — the governance owner.
- Legacy Angular panel migration — the dashboard maintainer.
Related prompts
-
Grafana Annotations & Region Events Prompt
Design Grafana annotations — native, query-driven, and region annotations — to overlay deploys, incidents, and maintenance windows on dashboards via the API and provisioning.
-
Grafana Loki LogQL Panel Design Prompt
Design Grafana panels backed by Loki LogQL — log volume, error-rate, and extracted-metric panels — that stay fast by filtering on stream labels before parsing.
-
Grafana Chained Template Variables Prompt
Design Grafana dashboard template variables that chain (query → query → panel) so region, cluster, namespace, and pod filters cascade correctly without slow or broken dropdowns.
-
Grafana Data Links and Drilldowns Prompt
Wire Grafana data links and drilldowns so panels jump to related dashboards, Explore, or external tools carrying filter context.
More Grafana prompts & error guides
Browse every Grafana 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.