Use single-value panels to communicate straightforward, high-visibility metrics that don’t require trend analysis. Keep the number large, the color rules simple, and the units explicit.
At a glance: what each panel type does
-
Stat panels
- Present one main value very prominently (or a small set of values).
- Support color thresholds so the number turns red/yellow/green based on configured limits.
- Can show a faint sparkline for micro-context while keeping focus on the main value.
- Offer value mappings, unit formatting, and decimal precision for readability.
-
Gauge panels
- Render a value relative to a configurable range (think speedometer).
- Useful for visualizing proximity to an SLO, quota, or capacity limit.
- Support threshold bands and range min/max.
-
Bar gauge panels
- Use bars (horizontal or vertical) to compare the same metric across multiple entities.
- Good for comparing pod readiness, disk usage across nodes, or percent capacity across clusters.
- Support per-series coloring and threshold bands.
When to use each type
Practical examples
- Stat panel: show current request rate or P95 latency. Use color rules so green = healthy, red = investigate.
- Gauge: display error rate as a percentage of the SLO target so you can see how close you are to violation.
- Bar gauge: compare pod readiness percentages across deployments to quickly spot outliers.
Prometheus + Grafana examples
PromQL examples you can drop into a Grafana stat or gauge panel:- P95 latency (request duration):
- Error rate (5m window):
- Pod readiness percent (per deployment):
Best practices
- Map thresholds to meaningful operational states — use SLOs, capacity limits, or known performance breakpoints as the basis for color bands.
- Format units and precision for readability (e.g.,
%,ms,req/s), especially for wall-mounted displays or executive dashboards. - Use sparklines sparingly—only where they add immediate micro-context without distracting from the main value.
- For multi-entity comparisons, prefer bar gauges (human eyes are better at comparing bars than arc angles).
- Keep labeling clear: include the metric name, the exact unit, and a short description if space allows.
Tip: Put single-value panels in a summary row at the top of the dashboard. Use stat panels for rates and latency, gauges for SLO-relative values, and bar gauges for comparisons across entities.
Quick dashboard layout suggestion
- Summary row (top)
- Stat: current request rate
- Stat: P95 latency
- Gauge: error rate vs. SLO
- Bar gauge: pod readiness / capacity by deployment
- Exploratory rows
- Full time-series panels for each metric shown in the summary row
- Logs and traces linked from each panel for fast drill-down
Links and references
- Grafana documentation — Stat panel
- Grafana documentation — Gauge and Bar Gauge
- Prometheus — Querying Prometheus
- SRE and SLOs — Google SRE Book