What is Grafana? Dashboards and Visualisation Explained

Grafana is the de facto visualisation layer of the modern observability stack. Nearly every team running Prometheus, Loki, or Tempo eventually ends up in Grafana, staring at a dashboard to answer the question: is something broken right now?

What Grafana Actually Does

At its core, Grafana is a data visualisation platform. You point it at a data source -- a database, a metrics backend, a log aggregator -- and it renders the data as panels: time-series graphs, stat tiles, heatmaps, tables, and more. What makes Grafana powerful is that it does not care where your data lives. It speaks to Prometheus, InfluxDB, Elasticsearch, Loki, Tempo, PostgreSQL, CloudWatch, Datadog, and dozens of other systems through a plugin-based data source model.

This matters because real systems produce data in multiple places. Your application emits metrics to Prometheus, your infrastructure logs go to Loki, and your traces land in Tempo. Grafana lets you correlate all three in a single dashboard -- jumping from a spike in error rate (metrics) to the relevant log lines, and then drilling into a specific trace to find the slow database query.

The Grafana Stack

Labs (the company behind Grafana) has built a full observability suite around the core product:

  • Grafana -- dashboards and visualisation
  • Prometheus -- metrics collection and storage (not made by Grafana Labs, but deeply integrated)
  • Loki -- log aggregation with a PromQL-like query language (LogQL)
  • Tempo -- distributed tracing backend
  • Mimir -- horizontally scalable, long-term metrics storage

The common shorthand is the LGTM stack (Loki, Grafana, Tempo, Mimir). Together these components cover the three pillars of observability -- metrics, logs, and traces -- using a consistent data model and a single UI.

Connecting Grafana to Prometheus

The most common starting point is wiring Grafana to a running Prometheus instance. The configuration is straightforward:

# grafana/provisioning/datasources/prometheus.yaml
apiVersion: 1
datasources:
  - name: Prometheus
    type: prometheus
    url: http://prometheus:9090
    access: proxy
    isDefault: true
    jsonData:
      timeInterval: "15s"
      httpMethod: POST

With this provisioning file in place, Grafana picks up the data source automatically at startup. No manual UI clicks required -- critical for reproducible infrastructure. You can then build panels using PromQL queries. For example, to graph the 95th percentile HTTP request latency for a service:

histogram_quantile(0.95,
  sum(rate(http_request_duration_seconds_bucket{job="api-server"}[5m])) by (le)
)

Dashboards as Code

Grafana dashboards are stored as JSON internally. The operational problem is keeping those dashboards in version control and deploying them consistently. The two main approaches are:

Grafana provisioning -- Place JSON dashboard files in a provisioning directory on the Grafana host. Grafana loads them at startup and on a reload. Good for simple setups.

Grafonnet / Jsonnet -- Write dashboards as code using the Grafonnet library, then render them to JSON in your CI pipeline. This is the approach large engineering teams use to manage hundreds of dashboards without drift.

Storing dashboards in Git means you get code review, history, and rollback -- the same discipline you apply to application code.

Alerting in Grafana

Grafana 8+ ships a unified alerting system that can evaluate alert rules against any data source, not just Prometheus. Alert rules are defined directly in panels or via the Alerting UI. When a rule fires, Grafana routes the notification through a contact point (Slack, PagerDuty, email, webhooks) using a routing tree.

This is an alternative to Alertmanager for teams who want to manage their alert routing in a single UI rather than maintaining a separate Alertmanager configuration.

Grafana vs Datadog

Both tools show you metrics on dashboards, but they serve different operating models:

Grafana OSSDatadog
Cost modelFree (pay for cloud hosting)Per-host / per-metric pricing
Data ownershipYour infrastructureVendor's cloud
Setup effortHigherLower
Integration depthPlugin-based, community-drivenBroad, first-party agents
Query languagePromQL, LogQL, etc.DQL (Datadog Query Language)

For teams with strong DevOps capacity, Grafana offers significantly lower cost at scale and keeps data in your own environment. Datadog is a better fit when you need fast time-to-value and have budget to absorb the cost.

Practical Starting Point

The fastest way to run the full Grafana + Prometheus stack locally is with Docker Compose. The devops tools guide has a working example. Once you have metrics flowing, you can import community dashboards from grafana.com/dashboards -- there are pre-built dashboards for Kubernetes, Node Exporter, Nginx, and hundreds of other systems.

Grafana is a central piece of any serious observability practice. Understanding how to query your data sources, build meaningful dashboards, and route alerts reliably is a core DevOps skill.

Frequently Asked Questions