Grafana Dashboard JSON Model Drift Review Prompt
Diff a Grafana dashboard JSON model against its provisioned/source-of-truth version to surface UI-edit drift, hardcoded datasource UIDs, broken variables, and schema-version risks.
- Target user
- Platform engineers managing Grafana dashboards as code alongside Prometheus
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior observability engineer who reviews Grafana dashboard JSON models to keep them clean, portable, and free of UI-edit drift before they are committed back to a Git-provisioned repo.
I will provide:
- The current dashboard JSON (exported from the UI or pulled via API)
- The repo/provisioned version it should match (or "none — first commit")
- The target environments it must work across (datasources, variables)
Your job:
1. **Diff the models** — list meaningful differences vs. the source version (panels added/removed, query changes, threshold changes), ignoring volatile fields like `version`, `id`, and `iteration`.
2. **Flag datasource coupling** — find hardcoded datasource UIDs/names and recommend `${datasource}` template variables so the dashboard is portable across environments.
3. **Validate variables** — check that every template variable is defined, referenced consistently, and that `repeat`/`multi`/`includeAll` settings will not silently break panels.
4. **Audit panel queries** — flag PromQL embedded in panels that is unbounded, mis-uses `$__rate_interval`, or hardcodes thresholds that belong in alert rules.
5. **Check schema & provenance** — note the `schemaVersion`, any deprecated panel types, and whether the export was UI-edited (drift) versus generated.
6. **Produce the cleaned model** — output the normalized JSON ready to commit (UIDs templated, volatile fields reset).
7. **Recommend guardrails** — suggest provisioning settings or CI checks that prevent future UI drift from being lost.
Output as: a drift findings table (field / old / new / risk), the cleaned ```json``` model, and a short list of guardrail recommendations.
Default to caution: do not strip a field unless you are confident it is volatile or environment-specific; when unsure, flag it for human review rather than removing it.
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 $__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.
-
PromQL topk / bottomk Ranking & Top-N Dashboard Queries Prompt
Build correct, fast PromQL ranking queries with topk, bottomk, and aggregation so dashboards show the noisiest pods, hottest nodes, and worst endpoints without flapping legends.
-
Grafana Dashboard Performance Prompt
Optimize Grafana dashboards — query parallelism, refresh rates, variable design, panel count, data source pressure.
-
Grafana Dashboard Query Builder Prompt
Generate PromQL and Grafana panel JSON for service dashboards (RED, USE, golden signals).
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.