RousselTMLEARNING

Observability

Dashboard engineering: state visualizations, annotations, library panels and navigation

Building professional dashboards: State timeline, Status history, Node graph, annotations, library panels, repeated panels, data and dashboard links, dynamic text.

1. Visualizing states #

State timeline, Status history and Node graph.

Three visualizations to know #

Available in: ✓ OSS ✓ Enterprise ✓ Cloud

VisualizationShowsExample
State timelinea series' state changes over time, as coloured bandsavailability of each service, circuit breaker state
Status historya grid of cells: one row per series, one cell per intervalprobe status per hour, backup results
Node graphnodes and directed edges, with their statisticsservice dependencies (service graph)

State timeline #

# State timeline: state of each target over time (1 = up, 0 = down)
up{job=~"api|db|cache"}
# Then in the panel options: Value mappings 1 -> “OK” (green), 0 -> “KO” (red)
Best practice : Value mappings and thresholds make it readable: a clear state beats a line between 0 and 1.

Node graph #

# Node graph: the panel expects two tables, “nodes” (id, title, mainstat…) and “edges” (id, source, target).
# The simplest source: Tempo's service graph (“Service Graph” tab in Explore),
# fed by Tempo's metrics-generator or by Grafana Alloy (otelcol.connector.servicegraph).

2. Annotations #

Showing events on graphs.

Three annotation sources #

  • Manual: Ctrl + click (or Cmd + click) on a graph to record an event.
  • Queries: in dashboard settings, a query returning events (Prometheus alerts, deployments in Loki, rows from a SQL table).
  • API: your CI publishes each deployment; you immediately see whether a degradation follows a release.

From a pipeline #

# Create an annotation from a deployment pipeline (service account token)
curl -s -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' -X POST $GRAFANA/api/annotations \
  -d '{"tags":["deployment","api"],"text":"api v2.4.1 deployed by GitLab CI"}'

3. Reuse: library panels and repeats #

Stop copy-pasting panels.

Library panels #

A library panel is stored in a folder and inserted into several dashboards: editing it once updates every dashboard that uses it. Ideal for “Service availability” or “5xx errors” shown the same way everywhere. Its permissions follow its folder's.

Repeated panels and rows #

In Panel options › Repeat options, choose a multi-value variable: Grafana creates one panel per value (horizontally or vertically, with a maximum per row). A repeated row or tab duplicates a whole group of panels, for example a full block per server.

Watch out : A repeat over a 200-value variable creates 200 panels and as many queries: limit the values selected by default.

Advanced variables #

Chained variables, variables shared across dashboards or specific to a row are covered in the “Variables and constants” chapter of this course.

4. Navigating: data links and dashboard links #

From overview to detail in one click.

The NOC journey #

Navigation between levels of a NOC dashboard

Data links #

A data link is attached to a value: clicking the “payment” service bar opens that service's dashboard, over the same time range. The ${__field.labels.xxx}, ${__value.raw}, ${__url_time_range} and ${__all_variables} variables carry the context.

# Data link from a “global view” panel to a service dashboard
/d/service-detail/service?var-service=${__field.labels.service}&${__url_time_range}
# To a server dashboard, keeping current variables
/d/server-detail/server?var-instance=${__field.labels.instance}&${__all_variables}&${__url_time_range}

Dashboard links #

In dashboard settings, links show shortcuts to other dashboards at the top of the page: by tag (every dashboard tagged noc, as a dropdown) or by URL. Tick “Include current time range” and “Include current template variable values” to keep context.

5. Dynamic text #

A text panel that follows variables.

The Text panel #

The native Text panel renders Markdown and replaces variables: service header, links to the runbook or ticket, displayed time range. For content computed from data (Handlebars templates), community plugins exist; check their maintenance and signature before adopting them.

## Service ${service}
Environment : **${env}** · time range : ${__from:date:YYYY-MM-DD HH:mm} → ${__to:date:YYYY-MM-DD HH:mm}

[Open the runbook](https://wiki.exemple.fr/runbooks/${service})

Commands to know #

Commands to know
  • ${__field.labels.instance} : label value of the clicked series (data link)
  • ${__url_time_range} : current time range to pass in a link
  • ${__all_variables} : every dashboard variable in a link
  • ${var:queryparam} : variable as a URL parameter (var-x=…)
  • POST /api/annotations : publish an event (deployment, incident)
  • GET /api/library-elements : list library panels

Related articles

Grafana administration and security: organizations, teams, RBAC, service accounts and authentication

Running Grafana in a company: organizations, teams, folders, roles and RBAC, data source permissions, service…

Automating Grafana: HTTP API, Terraform and dashboard lifecycle

Industrializing Grafana: HTTP API (folders, dashboards, users, data sources), Terraform provider, dashboards …

Operating Grafana: internal metrics, health, logs, performance and backups

Operating Grafana: /metrics and /api/health endpoints, logs, slow queries, dashboard performance, caching, pl…

Keep learning

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!