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

Grafana Business KPI Dashboard Design Prompt

Design an executive/business KPI dashboard in Grafana with stat panels, trend sparklines, thresholds, and period-over-period comparisons.

Target user
SREs and analysts building executive dashboards on operational data
Difficulty
Intermediate
Tools
Claude, ChatGPT

The prompt

You are a senior observability engineer who designs executive-facing KPI dashboards that leadership actually reads.

I will provide:
- The business metrics (revenue, signups, conversion, churn, uptime)
- The data sources they come from
- The audience and refresh cadence

Your job:

1. **Choose a top-line layout**: a row of Stat panels for headline KPIs with big value, unit, and a trend sparkline.
2. **Add context**: value mappings and thresholds so numbers turn green/amber/red against targets, not just raw figures.
3. **Period-over-period**: compute deltas vs previous period (WoW/MoM) using time-shift queries or transformations and show percent change.
4. **Trend panels**: time series with clear units, smoothed where noise obscures signal, and annotated with key events.
5. **Segmentation**: template variables for region/product so execs can slice without new dashboards.
6. **Avoid vanity metrics**: tie each KPI to a target or SLO so it drives decisions.
7. **Readability**: minimal panels, consistent units, no jargon, and a title/description explaining the "so what".
8. **Provisioning**: deliver the dashboard as JSON with thresholds and value mappings encoded.

Mark DESTRUCTIVE: none for viewers, but heavy business queries against a production OLTP datasource can impact the app — prefer a warehouse/replica.

---

Business metrics: [DESCRIBE]
Data sources: [DESCRIBE]
Audience/cadence: [DESCRIBE]

Why this prompt works

Executive dashboards fail when they are dense, unit-ambiguous, or full of vanity metrics with no target. This prompt forces a headline-first layout, threshold-driven color, period-over-period context, and a warehouse/replica data path — the elements that make leadership trust and act on a KPI board.

How to use it

  1. List the KPIs and their targets so the assistant can wire thresholds.
  2. Name the data source so it steers queries to a replica/warehouse.
  3. State the audience so density and jargon are calibrated.
  4. Ask for the dashboard JSON with thresholds and mappings encoded.

Useful commands

# Import the finished dashboard via the Grafana API
curl -X POST http://localhost:3000/api/dashboards/db \
  -H "Authorization: Bearer $GRAFANA_TOKEN" \
  -H "Content-Type: application/json" \
  -d @kpi-dashboard.json

# List folders to place the KPI dashboard for the exec team
curl -s -H "Authorization: Bearer $GRAFANA_TOKEN" \
  http://localhost:3000/api/folders | jq '.[].title'

Example config

// Stat panel: monthly revenue with threshold coloring and sparkline
{
  "type": "stat",
  "title": "Revenue (MTD)",
  "fieldConfig": {
    "defaults": {
      "unit": "currencyUSD",
      "thresholds": {
        "mode": "absolute",
        "steps": [
          { "color": "red", "value": null },
          { "color": "yellow", "value": 800000 },
          { "color": "green", "value": 1000000 }
        ]
      }
    }
  },
  "options": {
    "graphMode": "area",
    "colorMode": "value",
    "reduceOptions": { "calcs": ["lastNotNull"] },
    "textMode": "value_and_name"
  }
}
-- Period-over-period revenue with a time-shift comparison (Postgres warehouse)
SELECT
  $__timeGroup(order_ts, '1 day') AS time,
  sum(amount) FILTER (WHERE order_ts >= now() - interval '30 days') AS current,
  sum(amount) FILTER (WHERE order_ts <  now() - interval '30 days'
                       AND order_ts >= now() - interval '60 days') AS previous
FROM orders
WHERE $__timeFilter(order_ts)
GROUP BY 1 ORDER BY 1;

Common findings this catches

  • Vanity metrics → KPI with no target/threshold.
  • Ambiguous figures → missing or mixed units.
  • Misleading deltas → wrong period-over-period window.
  • Production impact → business query on OLTP primary.
  • Buried headline → too many panels above the fold.
  • Governance risk → sensitive revenue broadly shared.
  • Wasted spend → aggressive refresh on costly warehouse queries.

When to escalate

  • Data source load or warehouse cost — data platform team.
  • Sensitive financial data sharing — data governance/security.
  • Metric definitions disputed across teams — align on a metrics dictionary first.

Related prompts

Newsletter

Free: the DevOps AI Incident-Triage Cheat Sheet

Subscribe and we’ll send you the one-page cheat sheet — plus weekly AI prompts, automation ideas, and tool reviews for infrastructure engineers. One email a week. No spam, unsubscribe anytime.

  • AI Incident-Triage Cheat Sheet (PDF)
  • Access to 2,104 DevOps AI prompts
  • One practical workflow email per week