EMZETT.
Login

Dashboards with Grafana: Making metrics visible

In short: Grafana connects to data sources such as Prometheus or databases and shows measurements as charts, gauges and alerts in a dashboard.

In more detail: Numbers alone are hard to survey. A dashboard presents important measurements clearly so that problems are noticed early. Grafana is the best-known free tool for it and works with many data sources.

In Depth

Building blocks

  • Data sources: Prometheus, InfluxDB, PostgreSQL, Loki (logs), Tempo (traces), CloudWatch and others.
  • Panels: time-series charts, gauges, tables, heatmaps, number fields.
  • Variables: selection lists (server, environment) so one dashboard serves many targets.
  • Alerting: rules that warn by email, Slack or Telegram when thresholds are exceeded.

A good dashboard

Orient yourself on the four golden signals: latency, traffic (requests per second), errors and saturation (CPU, memory). The most important figures at the top, details below. Label units, avoid overloaded screens and set threshold colours (green/yellow/red). A dashboard should answer a question (“Is the service running?”), not be decoration.

Setup with Prometheus

Prometheus collects and stores metrics, Grafana queries them with PromQL:

rate(http_requests_total{status=~"5.."}[5m])

shows the error rate of the last 5 minutes. Dashboards can be exported as JSON and versioned in Git (dashboards as code).

Designing alerts sensibly

Too many alarms lead to alert fatigue. Warn only about things that demand immediate action, use waiting times (“longer than 5 minutes”) and refer to a runbook in the alert. Together with logs and traces real observability arises.

See also: Prometheus and metrics, Observability, Time-series databases