Course contents · Lesson 20 of 22

Monitoring Dashboards That Help During Incidents

Alerts, Dashboards and SLOs · Lesson 20 of 22 · 10 min Engineer

An alert fires at 2:14 p.m.: checkout errors are up. You open the team's dashboard and face 60 graphs in no particular order, half of them showing average CPU. Three minutes later you are still scrolling. Good monitoring dashboards are built for exactly that moment. They answer "is it healthy?" at a glance and "where is the problem?" within a minute or two, and they lead you on to the traces and logs that explain why.

Start from the viewer's question

A dashboard is a page of panels, each a graph or number drawn from a query, that share one time range. Before adding any panel, decide who will look at the dashboard and what they need to know. An on-call engineer in an incident, a team reviewing last week and a manager checking a launch ask different questions, so they need different dashboards.

For incidents the questions come in a fixed order. First: is the service healthy, and are users affected? If not: where is the problem, in which service, dependency or resource? Only then: which instance, route or request? An overview dashboard answers the first two questions for one service, and drill-down dashboards answer the third. Link them so that each step is one click.

Flowchart of five steps: alert fires, overview dashboard, locate the unhealthy service or dependency, drill-down dashboard, traces and logs, with a loop back to the overview to confirm recovery
The overview is where an incident starts and where it ends: you return to it to confirm that every row is healthy again.

Lay it out top-down

People read a page from top to bottom, so put the most important answer at the top. Row 1 is status: a few single numbers such as SLO attainment, error budget left, current error rate and p95 latency, from the SLI, SLO and SLA lesson. Row 2 is RED (Rate, Errors, Duration) from the golden signals lesson: what users feel right now.

Row 3 shows resources with USE (utilisation, saturation, errors): CPU, memory and connection pools. Row 4 shows dependencies, such as the database and a payment API, measured as your service sees them. If row 2 and row 4 both turn red, the dependency is the first suspect. Detail panels go further down, in collapsed rows that load only when opened.

Wireframe of a checkout overview dashboard with four numbered rows: status numbers, RED graphs, resource graphs and dependency graphs, where the payment API error panel is highlighted
Reading in order, row 1 says users are hurting, row 2 confirms errors, row 3 clears the machines and row 4 points at the payment API.

The RED row comes from three Prometheus queries, one per panel. Each assumes the service exports a request counter and a request-duration histogram:

# Rate: requests per second
sum(rate(http_requests_total{job="checkout"}[$__rate_interval]))

# Errors: share of requests that failed with a 5xx status
sum(rate(http_requests_total{job="checkout",code=~"5.."}[$__rate_interval]))
  / sum(rate(http_requests_total{job="checkout"}[$__rate_interval]))

# Duration: p95 latency, combined across all pods
histogram_quantile(0.95,
  sum by (le) (rate(http_request_duration_seconds_bucket{job="checkout"}[$__rate_interval])))

$__rate_interval is a Grafana variable that picks a rate window at least four scrape intervals long, so panels stay correct when you zoom in or out. The latency query adds up the histogram buckets from all pods before computing the percentile, which is the right order, as the percentiles lesson explained. Set the panel unit to seconds and Grafana shows readable values such as 212 ms.

Design habits that save minutes

Use one time range for the whole dashboard and one timezone, usually UTC for teams spread across zones, so every panel lines up when you compare them. Avoid per-panel time overrides: they can make two graphs look related when they show different hours.

Give every panel a unit and a title that says what and where, such as "Checkout · 5xx error ratio (%)", not "errors". A bare 0.0023 helps nobody at 3 a.m. Draw thresholds on graphs at the values that matter, such as the SLO target, so normal and bad are visible without memorising numbers.

Mark deploys. Many incidents start with a change, and an annotation, a vertical marker on every graph at one moment in time, shows whether a spike began right after one. A deploy pipeline can add one through Grafana's HTTP API:

curl -s -u admin:admin -H 'Content-Type: application/json' \
  -X POST http://localhost:3000/api/annotations \
  -d '{"time": '"$(date +%s)000"', "tags": ["deploy", "checkout"], "text": "checkout v1.4.2 deployed"}'

Grafana replies with JSON such as {"id":1,"message":"Annotation added"}. The time is in milliseconds since 1970, which is why the command appends three zeros to date +%s. To show these markers, open the dashboard settings, add an annotation query on the built-in Grafana source and filter by the deploy tag. In a real pipeline, use a service account token instead of the admin password.

Pick the right panel type

A time series panel draws lines over time and suits most panels, because trends and sudden changes are what you look for. A stat panel shows one current number in large type, coloured by threshold, which makes it right for the status row. A heatmap shows the whole latency distribution over time, one coloured column per time slice, so you can see requests split into a fast group and a slow group, which a single p95 line hides.

A table suits lists, such as the ten routes with the most errors, but it hides change over time, so use it sparingly and below the graphs. Gauges and pie charts show a single moment and are hard to compare, so most incident dashboards skip them.

Anti-patterns to remove

Four habits make dashboards fail during incidents. A wall of 50 panels is slow to load and has no reading order. Average-only latency hides the slow tail that users complain about. A dashboard nobody owns slowly fills with panels showing "No data" for metrics that were renamed long ago. And a dashboard with no links leaves you hunting for the runbook, the traces and the logs.

The fixes are cheap. Name an owner in each dashboard's description, put runbook, trace and log links in the dashboard header, show percentiles instead of averages, and delete panels nobody has opened in months. Grafana's own dashboard best practices page covers the same ground in more depth.

Before and after: a grid of 48 unordered mini panels on the left, and the same signals arranged as status, RED, resources and dependency rows on the right
Reorganising adds no new data; it only gives the eye a starting point and a path, which is what saves minutes in an incident.

Check yourself

What belongs at the top of an incident dashboard, and why?

The status numbers and RED graphs, because they answer the first question, whether users are affected, before anything else.

Why add a latency heatmap when you already have a p95 line?

The heatmap shows the whole distribution, so it reveals patterns such as a separate slow group of requests that one percentile line hides.

Latency jumps at 14:02. Which dashboard feature tells you fastest whether a deploy caused it?

Deploy annotations: a marker at 14:01 on every graph points straight at the change.