Learning path Intermediate
Monitoring and observability with Docker
Know what your server is doing: metrics with Prometheus, Node Exporter and cAdvisor; dashboards with Grafana; real-time monitoring with Netdata and Glances; centralized logs with Loki and live logs with Dozzle; and a lightweight monitor with Beszel.
- 8 resources
- 4 views
- ~74 min
This path teaches you to build a monitoring and observability stack for your Docker containers, combining metrics, dashboards and centralized logs with open source tools. It is meant for anyone already running services in Docker with docker-compose who wants to stop guessing why a container is slow or has crashed.
What you’ll be able to do
By the end you’ll know how to deploy your own metrics system, visualize it in clear dashboards and centralize the logs from every container in one place, without depending on a paid SaaS. This is an intermediate-level path: it assumes you already know how to run services with docker-compose, expose ports and edit YAML files; no prior experience with Prometheus or Grafana is required.
How the path builds
It starts with the metrics engine: you install Prometheus, then add Node Exporter and cAdvisor, the exporters that give it visibility into the host and into each container separately. With those metrics flowing, Grafana comes in to turn them into dashboards you can read at a glance. The path then shifts toward logs: Grafana Loki centralizes records from the whole stack, while Dozzle lets you watch a container’s logs live straight from the browser, no terminal needed. It closes with three lightweight alternatives (Netdata, Glances and Beszel) for when a full Prometheus and Grafana setup is more than a small server needs. cAdvisor alone already exposes dozens of per-container metrics with no extra configuration, so you’ll see results from the very first step.
How to Install Prometheus with Docker
Prometheus is the most widely adopted open-source monitoring and alerting system for self-hosted infrastructure, and with Docker you bring it up with a single docker-compose.yml and a prometheus.yml. It collects metrics using a pull model, stores them in its time-series database and exposes them on port 9090, ready to query with PromQL and visualise in Grafana.
Host and Container Metrics with Node Exporter and cAdvisor
Node Exporter and cAdvisor are the two exporters that feed Prometheus: the first collects host metrics (CPU, RAM, disk and network) on port 9100, and the second collects per-container metrics on port 8080. This guide brings both up with a single docker-compose.yml, connects them to Prometheus and explains which metrics to watch.
How to Install Grafana with Docker
Grafana is the most widely used open-source platform for building dashboards and visualising metrics, and with Docker you bring it up with a single docker-compose.yml. It listens on port 3000, stores its data in /var/lib/grafana and connects to Prometheus, Loki or InfluxDB as data sources. Here you install it, provision it and publish it with Traefik.
How to Centralize Logs with Grafana Loki in Docker
Grafana Loki is an open-source log aggregation system that indexes only labels and keeps the content compressed, which makes storage ten to a hundred times cheaper than Elasticsearch. With Docker you bring it up with a single docker-compose.yml, ship your logs with the Docker driver or Grafana Alloy and query them with LogQL in Grafana on port 3100.
How to View Container Logs with Dozzle
Dozzle is a real-time log viewer for containers, written in Go: it stores nothing, it reads the logs straight from the Docker socket and streams them to your browser. With Docker you bring it up with a single docker-compose.yml, it listens on port 8080 and shows the live logs of every one of your containers.
How to Install Netdata with Docker
Netdata is a real-time monitoring system that, with Docker, shows hundreds of per-second metrics from your server and its containers with almost no configuration. It comes up with a single docker-compose.yml that mounts the host system paths, exposes a full dashboard on port 19999 and automatically detects every service you run.
How to Monitor Your Server with Glances in Docker
Glances is a real-time system monitor written in Python that, in web server mode, shows CPU, memory, disk, network and containers from the browser on port 61208. With Docker you bring it up with a single docker-compose.yml, mounting the Docker socket, and it also exposes a REST API at /api/4 to automate things.
How to Install Beszel with Docker
Beszel is a lightweight server monitoring platform built on PocketBase that splits into two pieces: a hub with a web dashboard on port 8090 and an agent that runs on each watched machine and listens on 45876. This guide brings both up with Docker Compose, pairs them and sets up alerts.