Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for Grafana Difficulty: Intermediate ClaudeChatGPTCursor

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

  1. Paste the raw JSON, not a screenshot, so model-only issues surface.
  2. Name the target instances so portability findings are grounded.
  3. Act on blockers before import — especially hardcoded UIDs and aggressive refresh.
  4. 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 refresh too aggressive.
  • Limit-tripping queriesincludeAll with .* 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

More Grafana prompts & error guides

Browse every Grafana prompt and troubleshooting guide in one place.

Free download · 368-page PDF

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.