On-call dashboards that actually get used
In Designing alerts that only fire when a human needs to act, a page means a person has to do something now, and the notification should include a dashboard link. In Writing a runbook you can use at 3am, that dashboard is where the reader first checks impact. This post is about making it worth opening.
If the on-call engineer has to search, guess the time range and invent queries, the dashboard has already failed. Its job is narrower: answer the questions they will ask in the first few minutes, correctly, from a link on the page.
1. Start from the questions, not the metrics
Before adding a panel, ask whether it helps with one of these:
- Is it broken? Error rate, SLO burn, and latency against the objective. Not CPU, unless that is the symptom users feel.
- For whom? Which service, region or path is affected, and whether the rest is fine.
- Since when? When the symptom started, and whether it is getting worse, steady or recovering.
- What changed? A deploy, a config push, a restart, a traffic shift.
- Where? Which instance, zone or dependency is involved, so the next step is concrete.
Cause metrics still belong, one click down, once the symptom is clear. That is the same split as the alerting post: page on symptoms, use causes to diagnose.
2. One top-level dashboard per service
Each service that can page should have one dashboard the alert links to, not a folder of twenty and not every metric the exporter knows about.
For a request-serving service, put RED at the top: rate, errors, and duration (the latency distribution). The Google SRE golden signals add saturation to that set. For hosts and other resources, use the USE method: utilization, saturation and errors. RED tells you how users are doing; USE tells you how the machines are doing.
Show SLO burn on that same first screen. For low-latency trading hosts, tail latency and saturation belong here too, not only availability, as in SRE when latency matters as much as uptime.
Put the dashboard URL in the alert, the same way you put runbook_url, with query parameters that open the right service and a time range around the page.
3. Drill down, don’t make them hunt
The first row is the symptom: traffic, errors, latency, burn, saturation. The next rows break it down by instance, path or status, then by dependency and resource.
Dashboard and panel links should keep the time range and template variables, so a spike leads to an already scoped view. Shared crosshair helps when comparing start times. Split or facet when magnitudes differ, so a large service does not hide a small one on the same axis.
4. Annotate deploys and other changes
Making changes you can take back: safe releases for infrastructure already recommended marking deploys and config changes on graphs. During an incident, that is often the fastest way to see what changed.
Grafana can overlay annotations from any data source. With Prometheus, the expression must be true only at the moment you care about: every returned sample becomes a marker, so a continuous series will flood the panel. A deploy timestamp metric is the cleanest source. Process start time is a useful fallback, and it also catches crashes:
changes(process_start_time_seconds{job=~"$job"}[5m]) > 0
Deploy logs in Loki work the same way if you can select them with a tight label matcher. Name the annotation clearly and let the engineer toggle it off.
5. Use template variables carefully
Variables let one dashboard cover many jobs or environments, and they also make it easy to blow up every query at once. Keep the set small: service or job, environment, and instance only once the engineer has narrowed in. If a variable is multi-value or has an All option, match it with =~ in PromQL and LogQL, because Grafana then supplies a regular expression, not a single string. Do not default All on a high-cardinality label; opening every instance of every job makes the top view slow and unreadable at 3am.
6. Get histograms and percentiles right
Latency panels are where dashboards most often lie. The rules in How to measure latency without fooling yourself apply directly to PromQL.
Compute quantiles from histogram buckets over a window, and keep the le label when you aggregate classic histograms:
histogram_quantile(
0.99,
sum by (le, job) (rate(http_request_duration_seconds_bucket{job=~"$job"}[5m]))
)
Do not average percentiles. The mean of per-instance p99s is not the p99 of the combined traffic. Merge the buckets, then take the quantile. Show more than one percentile, plus the request count in the window, so a sparse p99.9 is obviously sparse.
Put the queries you alert on, and the ones you show first, into recording rules, and point both the alert and the dashboard at the recorded series so the graph shows the number that paged you. Prometheus names those rules as level:metric:operations, for example job:http_request_duration_seconds:p99_rate5m. Grafana’s $__rate_interval is useful for exploratory rate graphs because it follows the zoom level, but do not use it to re-implement a rule or an alert, or the windows will diverge.
7. Correlate metrics with Loki, using the same labels
A jump from a spike to “what did the process say?” is cheap if Prometheus and Loki share a small set of stable labels: job, instance, env. A logs panel or Explore link can reuse the same dashboard variables:
{job=~"$job", instance=~"$instance"} |= "error"
Start with a tight label selector, then a line filter such as |= before any regular expression. Contains-filters and a precise stream selector are cheaper than regex or a wide scan. Do not turn high-cardinality fields into Loki labels. Request IDs, trace IDs, user IDs and timestamps belong in the log line, or in structured metadata if you search them often. Loki is built for long-lived, low-cardinality streams; unbounded labels create huge indexes and tiny chunks, and they slow the logs you need in an incident.
Exemplars can link a latency sample to a trace on a Grafana time series panel, if the application emits them (OpenMetrics), Prometheus has exemplar storage enabled, and a traces data source is configured. They are not required for a usable on-call dashboard, and a link to a sampled-out trace is a dead end.
8. Treat dashboards as code, and prune them
Store the dashboard JSON in Git and load it with Grafana’s file provisioning. Review the changes the same way you review alert rules. Leave allowUiUpdates off on provisioned dashboards so a late-night click in the UI does not leave a live copy that Git no longer describes, or one the next provision overwrites. Give each on-call dashboard an owner. After incidents, prune the ones nobody opened, as you would an alert nobody acts on. Name temporary experiments clearly, then delete them. A copy that only pins a variable should be a link with URL parameters, not a fork that drifts.
9. Checklist
Before a dashboard is linked from a page:
- It answers is it broken, for whom, since when, what changed and where, in that order.
- One top-level view per service, with RED or golden signals, saturation and SLO burn on the first screen.
- The alert opens it with the right labels and a useful time range; drill-down keeps that context.
- Deploys and restarts appear as annotations, from a query that only fires at those moments.
- Template variables narrow the view; All is not the default on a high-cardinality label.
- Percentiles come from
histogram_quantileonrate()of buckets, not from averaged percentiles. - Alerts and top panels use the same recording rules.
- Logs share labels with metrics; high-cardinality fields are not Loki labels.
- The JSON lives in Git, has an owner, and is removed if nobody uses it during incidents.
References
- Google SRE book, Monitoring Distributed Systems (golden signals).
- Brendan Gregg, The USE Method.
- Tom Wilkie, The RED Method.
- Prometheus, Histograms and summaries,
histogram_quantile(), and recording rules. - Grafana, Dashboard best practices, provisioning, Prometheus annotations, template variables, and exemplars.
- Grafana Loki, Label best practices, cardinality, and query best practices.