Grafana Bar Gauge & Gauge Panel Design Prompt
Design Grafana bar gauge and gauge panels — thresholds, LCD vs basic mode, calculation, and orientation — so single-stat health reads honestly at a glance.
- Target user
- Engineers building at-a-glance health and capacity panels in Grafana
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT, Cursor
The prompt
You are a senior dashboard designer who builds Grafana bar gauge and gauge panels that read a status honestly in one glance, without misleading thresholds or aggregation. I will provide: - The metric(s) and what "good/warning/bad" mean for each - Whether the panel shows one value, one-per-series, or a top-N - The datasource and query Your job: 1. **Panel + mode**: choose bar gauge vs gauge, and for bar gauge pick `basic`, `LCD`, or `gradient` display; set `orientation` (horizontal for many series, vertical for a few) and whether to show `unfilled` background. 2. **Reduce calculation**: set the `reduceOptions` calculation deliberately — `lastNotNull` for current state, `mean`/`max` for a window — and explain why `last` on a sparse series can read as 0/No data. 3. **Thresholds**: define absolute or percentage thresholds with a base color and green/amber/red steps that match the real SLO, and set `min`/`max` so a gauge's fill is proportional and honest. 4. **Units & decimals**: pick the correct unit (percent, bytes, ops/s), sensible decimals, and value mappings for special cases (e.g. `null → "No data"`). 5. **Many series**: for one-bar-per-instance, cap with a top-N query, set a repeat or `All values` mode, and warn when the panel will render dozens of bars illegibly. 6. **Provisioning**: deliver the panel `fieldConfig`/`options` JSON so thresholds and mode are reproducible. Mark DESTRUCTIVE: none — read-only. But warn that a gauge with no `max` set makes the fill meaningless. --- Metric(s) + good/warning/bad: [DESCRIBE] One value, per-series, or top-N?: [DESCRIBE] Datasource + query: [DESCRIBE]
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
Bar gauges and gauges are the panels people glance at during an incident, so a misleading threshold or an uncapped max does real damage. This prompt forces explicit min/max, a reduce calculation that matches the metric’s cadence, thresholds tied to the actual SLO, and a top-N cap when there are many series — then ships the config as JSON.
How to use it
- Define good/warning/bad numerically so thresholds are grounded, not guessed.
- Say whether it’s one value or many series so orientation and top-N are right.
- State the metric cadence so the reduce calc doesn’t read stale/No data.
- Ask for the panel JSON so thresholds are reproducible.
Useful commands
# Pull an existing panel's options to reuse thresholds/mode
curl -s -H "Authorization: Bearer $GRAFANA_TOKEN" \
http://localhost:3000/api/dashboards/uid/$UID \
| jq '.dashboard.panels[] | select(.type=="bargauge") | .fieldConfig'
Example config
{
"type": "bargauge",
"options": {
"orientation": "horizontal",
"displayMode": "lcd",
"reduceOptions": { "calcs": ["lastNotNull"], "values": false }
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"min": 0,
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "yellow", "value": 70 },
{ "color": "red", "value": 90 }
]
},
"mappings": [
{ "type": "special", "options": { "match": "null", "result": { "text": "No data" } } }
]
}
}
}
Common findings this catches
- Fill looks different each load → no explicit
max. - Panel reads “No data” →
lastcalc on a sparse series. - Wrong colors → threshold mode/unit mismatch.
- Illegible wall of bars → uncapped per-series query.
- Misleading zeros → missing null value mapping.
When to escalate
- Threshold values vs the real SLO — the service owner.
- Series cardinality/query cost — the metrics platform team.
- Dashboard style consistency — the dashboard governance owner.
Related prompts
-
Grafana Canvas Panel Design Prompt
Build a Grafana Canvas panel for custom diagrams and topology with elements bound to live metric data and thresholds.
-
Grafana Geomap Panel Design Prompt
Design a Grafana Geomap panel to plot geospatial metrics with markers, heatmaps, and layers driven by lat/lon or geohash fields.
-
Grafana State Timeline and Status History Prompt
Design Grafana State timeline and Status history panels to visualize discrete states like up/down, deploy phases, and health over time.
-
Grafana Alertmanager Datasource & Routing Prompt
Wire an external Alertmanager as a Grafana datasource and design its routing tree, grouping, inhibition, and silences so alerts reach the right receivers without storms.
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.