A data source is a configured backend that an application uses to retrieve data for querying, visualization, or alerting. In an observability frontend such as Grafana, it represents a backend such as Prometheus, Loki, Jaeger, MySQL, or Amazon CloudWatch. section 6.0 section 6.1.1
A data source supports several practical workflows:
- Feeds dashboards with queryable telemetry from one or more backends. section 6.1.1
- Provides data for centralized alert rules, including rules evaluated across multiple backends. section 7.2.2
- Creates a connection between a frontend and a telemetry destination; the URL and other backend-specific settings must be configured. section 2.3.2 section 2.5.2
Loki logs in Grafana
A local Docker Compose stack runs an echo service, Promtail, Loki, and Grafana. Promtail reads echo.log and ships it to Loki; Grafana then uses Loki as a data source, configured with http://loki:3100, for exploration and querying. A parallel Jaeger setup exposes traces to Grafana through http://jaeger:16686. section 2.3.2 section 2.5.2
Listing 6.1 The Docker Compose configuration for the Grafana instance
version: "3.5"
services:
grafana:
image: grafana/grafana-oss:9.1.4
ports:
- "3000:3000"
volumes:
- ./grafana.ini:/etc/grafana/grafana.ini #1
- ./ds.yaml:/etc/grafana/provisioning/datasources/datasource.yaml #2
depends_on:
- prometheus
prometheus:
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- ./prom-config.yaml:/etc/prometheus/prometheus.yml
Shows a Docker Compose configuration that provisions Grafana alongside Prometheus and mounts a data-source provisioning file. section 6.1.1
Centralizing many signals in one frontend can improve correlation, but treating a single pane of glass as an absolute requirement can waste time and money; practical exceptions remain. section 6.0












