Monitoring
grafana

Grafana

TypeScriptGoOpen SourceFree tier

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.

License

AGPL 3.0

Language

TypeScript / Go

61
Trust
Fair

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

Docker pulls
1B+ total
Commits (90d)
1.8k commits
GitHub stars
64k ★
Stack Overflow
16k q's
Community
Very High
Weighted Trust Score61 / 100

Download Trend

Last 12 months

Tradeoffs & Caveats

Know before you commit

You 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

Free tier

Open-source self-host free · Cloud: 10K metrics free

Paid

$299/mo Cloud Pro

Most teams self-host for free

Alternative Tools

Other options worth considering

prometheus
Prometheus96Excellent

The de facto open-source metrics collection and alerting system. Prometheus scrapes metrics endpoints, stores time-series data, and evaluates alert rules. The backbone of most Kubernetes observability stacks.

Often Used Together

Complementary tools that pair well with Grafana

prometheus

Prometheus

Monitoring

96Excellent
View
datadog

Datadog

Monitoring

86Strong
View
docker

Docker

DevOps & Infra

93Excellent
View
kubernetes

Kubernetes

DevOps & Infra

99Excellent
View
sentry

Sentry

Monitoring

94Excellent
View

Learning Resources

Docs, videos, tutorials, and courses

Get Started

Repository and installation options

View on GitHub

github.com/grafana/grafana

brewbrew install grafana
dockerdocker run -p 3000:3000 grafana/grafana

Quick 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/dashboards

Code 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:3100

Grafana 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.05

Community Notes

Real experiences from developers who've used this tool