liveBook · Manning

Data source

As explained in Cloud Observability in Action

A data source is a configured backend from which an application retrieves data for querying or visualization.

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

How Cloud Observability in Action covers it

How deep it goes
Explains configuration and workflows with Docker Compose examples, but defers backend-specific query implementation.
Examples
Uses Prometheus, Loki, Jaeger, CloudWatch, MySQL, Docker Compose, and Grafana provisioning files.
What it assumes
Assumes familiarity with Grafana and telemetry backends while demonstrating connection settings through local Docker Compose stacks.
What you can do after
Operate/configure Grafana data sources and connect them to local telemetry backends for exploration and alerting.
How it connects
Connects frontends with telemetry backends, dashboards, alerts, logs, metrics, traces, and plugins.

Also explained in

Compare how 13 books explain data source →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Cloud Observability in Action. The section links point to the parts of the book it draws on.