Grafana
The leading open-source visualization and dashboarding platform. Grafana connects to Prometheus, Loki, Tempo, and 100+ data sources to create rich, interactive dashboards. The visual layer of most observability stacks.
Why Grafana?
You need rich, interactive dashboards for your metrics
You're using Prometheus and want a visualization layer
You want a unified view across metrics, logs, and traces
Signal Breakdown
What drives the Trust Score
Download Trend
Last 12 months
Tradeoffs & Caveats
Know before you commitYou need a fully managed all-in-one solution (Datadog includes dashboards)
Your team doesn't have someone to manage dashboard configuration
Pricing
Free tier & paid plans
Open-source self-host free · Cloud: 10K metrics free
$299/mo Cloud Pro
Most teams self-host for free
Alternative Tools
Other options worth considering
Often Used Together
Complementary tools that pair well with Grafana
Learning Resources
Docs, videos, tutorials, and courses
Get Started
Repository and installation options
View on GitHub
github.com/grafana/grafana
brew install grafanadocker run -p 3000:3000 grafana/grafanaQuick Start
Copy and adapt to get going fast
# grafana/provisioning/datasources/prometheus.yaml
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
url: http://prometheus:9090
isDefault: true
editable: false
# grafana/provisioning/dashboards/default.yaml
apiVersion: 1
providers:
- name: default
folder: ''
type: file
options:
path: /var/lib/grafana/dashboardsCode Examples
Common usage patterns
Dashboard as code (JSON model)
Version-control a Grafana dashboard as a JSON file
{
"title": "My App Overview",
"panels": [
{
"type": "timeseries",
"title": "Request Rate",
"targets": [
{
"expr": "rate(http_requests_total[5m])",
"legendFormat": "{{route}}"
}
],
"gridPos": { "x": 0, "y": 0, "w": 12, "h": 8 }
}
],
"refresh": "30s",
"time": { "from": "now-1h", "to": "now" }
}Loki log datasource
Add Loki for log aggregation alongside Prometheus
# docker-compose addition
loki:
image: grafana/loki:latest
ports: ["3100:3100"]
command: -config.file=/etc/loki/local-config.yaml
promtail:
image: grafana/promtail:latest
volumes:
- /var/log:/var/log
- ./promtail-config.yaml:/etc/promtail/config.yaml
# datasources/loki.yaml
datasources:
- name: Loki
type: loki
url: http://loki:3100Grafana Alerts
Create an alert rule via provisioning YAML
# grafana/provisioning/alerting/rules.yaml
apiVersion: 1
groups:
- orgId: 1
name: my-app-alerts
rules:
- uid: error-rate-alert
title: High Error Rate
condition: C
data:
- refId: A
queryType: ''
relativeTimeRange: { from: 300, to: 0 }
datasourceUid: prometheus
model:
expr: rate(http_requests_total{status=~"5.."}[5m]) > 0.05Community Notes
Real experiences from developers who've used this tool