Comprehensive guide for grafana dashboard patterns covering essential concepts, practical examples, and production best practices.
Grafana dashboards are the primary interface for operational insight across systems. They matter when engineers, SREs, and platform teams need to answer: *What is happening now? Why? Where should we look next?* This page documents recurring, reusable solutions—patterns—for building effective Grafana dashboards that scale across services, teams, and environments. Each pattern addresses a common goal: from initial onboarding to root-cause analysis, and from daily monitoring to incident response.
A single dashboard that answers “Is the system healthy?” in under five minutes. It displays key metrics across infrastructure, application, and business layers, using a consistent layout and visual conventions.
Overall system health (color-coded: green = healthy, yellow = degraded, red = failed)Uptime (last 24h) (as a percentage bar or line chart)Error rate (last 1h) (as a time series with threshold lines)Latency (P95, P99) (as a dual-axis line chart)Throughput (RPS, events/sec) (as a stacked bar or area chart)Panels use:
last 1h, last 6h, last 24h (default: last 1h).Error rate > 1% → yellowError rate > 5% → redLatency P99 > 2s → yellowLatency P99 > 5s → redUse panel titles with consistent formatting: Service: <name> or Component: <name>. Panels use text panels for key metrics and stat panels for large numbers. Each stat has:
Value (e.g., 1.2M)Title (e.g., API Requests)Unit (e.g., RPS)Threshold (e.g., 1.0M)When multiple services, hosts, or instances share similar metrics, use a panel group with dynamic panel generation based on a query.
{{service}}: {{env}} - {{host}}.SELECT * FROM metrics WHERE service = '{{service}}' AND env = '{{env}}' AND host = '{{host}}'GROUP BY time(1m) and FILL(previous).For dynamic panel creation:
SELECT
service,
env,
host,
avg(latency),
sum(errors),
count(requests)
FROM metrics
WHERE service = '{{service}}'
AND env = '{{env}}'
AND time >= {{__from}} AND time <= {{__to}}
GROUP BY service, env, host
ORDER BY avg(latency) DESC
host.hosthorizontal{{host}} (latency: {{avg(latency)}}ms)SELECT time, latency FROM metrics WHERE host = '{{host}}'{{__from}} to {{__to}}This pattern auto-scales when new hosts are added. Panels appear in a row, and the dashboard adapts to any number of instances.
When an alert fires, the first dashboard engineers open is this one. It prioritizes root-cause analysis with a clear narrative.
Incident ID, Status, Start time, Duration, Affected services. # Incident: {{incident_id}}
- **Status**: {{status}}
- **Start**: {{start_time}}
- **Affected services**: {{services}}
- **Root cause**: {{root_cause}}
Events panel using JSON from a logging system: [
{
"timestamp": "2024-01-15T10:00:00Z",
"level": "error",
"message": "Database connection pool exhausted",
"service": "user-service",
"trace_id": "abc123"
},
{
"timestamp": "2024-01-15T10:02:15Z",
"level": "warning",
"message": "High CPU on api-gateway",
"service": "api-gateway",
"trace_id": "def456"
}
]
SELECT timestamp, level, message, service, trace_id FROM logs WHERE incident_id = '{{incident_id}}' ORDER BY timestamp{{__from}} to {{__to}}150px for timestamp, 200px for messagetimestamp as primary sort {
"trace_id": "{{trace_id}}",
"spans": [
{ "name": "request", "start": 1705320000000, "duration": 1200 },
{ "name": "database", "start": 1705320001000, "duration": 800 },
{ "name": "cache", "start": 1705320002000, "duration": 200 }
]
}
SELECT * FROM traces WHERE trace_id = '{{trace_id}}'{{__from}} to {{__to}}Use panel links:
When multiple metrics, logs, and traces point to a common issue, use this pattern to align them across time.
GROUP BY time(1m) and FILL(previous)legend format: {{metric}} ({{service}})time range: last 1h, last 10m, last 30mSync in Dashboard Settings.{{service}} - {{metric}}deployment (annotation source: deployments)alert (annotation source: alerts)manual (annotation source: manual)In query:
SELECT
time,
title,
text,
tags
FROM annotations
WHERE
dashboard_id = {{dashboard_id}}
AND time >= {{__from}} AND time <= {{__to}}
ORDER BY time
show, max 5, right alignmentcritical, warning, info levelsstacked, percent, fillleft, right, unit, min, maxWhen a new metric appears, align it with existing ones by:
A dashboard that lets engineers move seamlessly between services, environments, and components.
All Dashboards, Services, Environments, IncidentsService: {{service}} (clickable)Environment: {{env}} (clickable)Time range: {{time_range}}Refresh: every 1mservice (from SELECT DISTINCT service FROM metrics)env (from SELECT DISTINCT env FROM metrics)time_range (set to 1h, 6h, 24h, 7d)Click on service → navigate to service dashboardService: {{service}}service → serviceenv → envtime → timeClick on environment → open environment dashboardEnvironment: {{env}}env → envtime → timeView logs for {{service}} → open logs in external systemhttps://logs.example.com/?service={{service}}&from={{__from}}&to={{__to}}Use dashboard variables:
service (multi-select, default: all)env (multi-select, default: prod)time_range (dropdown, values: 1h, 6h, 24h, 7d)In dashboard settings:
1mPlatform: {{env}} — {{service}}A dashboard per service that shows its health, performance, and dependencies.
Status: {{status}} (color-coded)Latency (P95), Error rate, Throughput, Resource utilizationSELECT from_service, to_service, count, avg(latency), avg(errors) FROM dependencies WHERE from_service = '{{service}}'Sankeyfrom_service → to_servicecountavg(latency)avg(errors)Latency, Error rate, Throughput, CPU, Memory, Database queriestime series with GROUP BY time(1m)SELECT * FROM logs WHERE service = '{{service}}' AND time >= {{__from}} AND time <= {{__to}} ORDER BY timestamp DESCSELECT * FROM traces WHERE service = '{{service}}' AND time >= {{__from}} AND time <= {{__to}}Use panel links:
Sync time range is off in dashboard settings.Sync time range and set Sync interval to 1s.Refresh is set to on dashboard load, but variable refresh is not enabled.Refresh and set Refresh interval to 1s.error rate > 1%) do not show in the panel.Thresholds are defined in the panel query, but "Apply thresholds" is off in Panel Options.Apply thresholds and set Thresholds to 1, 5 (for error rate), 2s, 5s (for latency).{{var}}, but are not consistent.Service: {{service}}, Environment: {{env}}, Instance: {{host}}.host is null, title appears as Instance: null → fix: use {{host | default("unknown")}}.Repeat direction is vertical, but horizontal is expected.Repeat direction to horizontal and Repeat layout to grid.Annotation panel has overlap enabled, but max height is not set.Max height to 150px and Overlap to true.Export → JSON → Downloadvariables, annotations, panels, time rangeImport → JSON → UploadOverwrite dashboardUpdate variablesUpdate annotationsUse dashboard versioning:
git under dashboards/name: service-health.json, version: 1.2.0dashboard.json as default for each service.This completes the set of patterns for Grafana dashboards. Each is a reusable solution that can be applied across teams and systems, with precise, real-world mechanics that hold up under pressure.
This page was rewritten on 17 October 2026. It replaced a templated version that was not specific to its own title. How these pages are written and checked. If anything here is wrong, tell us at [email protected] and we will correct it.
We use cookies for analytics (Google Analytics) and advertising (Google AdSense) to improve your experience and support free content. Privacy Policy