102 — Setting Up Your Observability Lab

Beginner

Build a local observability stack with Docker Compose. You'll run Prometheus for metrics collection, Grafana for visualization, and an OpenTelemetry Collector to receive and route telemetry data. Starting state: Docker installed, no prior lab. After this lesson: ~/observability-lab/ running with Prometheus (:9090), Grafana (:3001), and OTel Collector (:4317/:4318/:8889). This lab directory is used for every lesson from 102 through 405.

Learning Objectives

1
Set up a local observability stack with Docker Compose
2
Configure Prometheus scrape targets and the OTel Collector
3
Access Grafana and connect Prometheus as a data source
4
Verify all services are running and communicating
Step 1

Verify Docker is installed

Before building the stack, confirm that Docker and Docker Compose are available on your machine.

Commands to Run

docker --version
docker compose version

What This Does

Docker runs each observability tool in its own container, so you don't need to install Prometheus, Grafana, or the OTel Collector directly on your machine. Docker Compose lets you define and start all the containers together with a single command.

Expected Outcome

You see version numbers for both Docker (e.g., 'Docker version 24.x' or newer) and Docker Compose (e.g., 'Docker Compose version v2.x').

Pro Tips

  • 1
    If docker compose version fails, you may have an older installation that uses docker-compose (with a hyphen) — upgrade to Docker Desktop for the v2 plugin
  • 2
    On Linux, make sure your user is in the docker group so you don't need sudo

Common Mistakes to Avoid

  • ⚠️If Docker Desktop is not running, you'll see 'Cannot connect to the Docker daemon' — start Docker Desktop first
  • ⚠️Docker Desktop needs at least 4 GB of RAM allocated for this course — check Settings > Resources in Docker Desktop
Was this step helpful?

All Steps (0 / 10 completed)