This course teaches you to build monitoring you can trust for a running service: metrics collected by Prometheus, questions answered with its query language PromQL, alerts routed by Alertmanager, and dashboards in Grafana. You will also learn to recognise when that monitoring is quietly lying to you, because a green dashboard and a silent pager are only reassuring if you know what they are actually measuring.
This first lesson explains how the course is organised, what you will build, where your files and containers live, and what the course leaves out.
What You Will Build
Everything happens on your own computer. You run a small monitoring stack in Docker containers and point it at a practice web service called the shop: a tiny HTTP API with two routes that do simulated work, a health check, and a switch that lets you inject slowness and errors on purpose. Over the course you:
- Start the stack and learn to tell, from Prometheus's own evidence, that each part is working.
- Read the metric formats Prometheus collects, then add your own request, error and latency metrics to the shop's Python code.
- Teach Prometheus where to collect metrics from, including host metrics and probes that test the shop from outside.
- Answer questions with PromQL: how many requests per second, what fraction failed, how slow the slowest five percent were, and whether something has gone missing.
- Turn those questions into recorded series and alerts, test the alerts before they matter, and deliver notifications to a local receiver.
- Build Grafana dashboards that answer stated questions and that you keep as files rather than as clicks.
- Run Prometheus responsibly: storage, retention, label growth and access protection, then alert on a service-level objective instead of a guess.
- Repair deliberately broken monitoring, and finally bring a second service to the same standard on your own.
How the Course Is Organised
The eight modules follow what you need next, not an exam outline. No exam weights or pass marks apply.
| Module | What it adds |
|---|---|
| Start Here | Monitoring questions, the running stack, how Prometheus collects and serves data |
| Metrics and Instrumentation | Metric types and formats; instrumenting the shop in Python |
| Scraping and Discovery | Scrape jobs, relabelling, file-based discovery, host metrics, endpoint probes |
| Query with PromQL | Selecting, rating, aggregating, dividing, percentiles and missing data |
| Rules and Alerting | Recording and alerting rules, rule tests, Alertmanager routing and suppression |
| Grafana Dashboards | Data source, panels, variables, dashboards as files, Grafana's own alerting |
| Operate and Set Objectives | Storage and retention, protecting the endpoints, objective-based alerts |
| Troubleshoot and Final Challenge | Two repair exercises and an independent challenge |
Each lesson states its goal and what it builds on. Concepts and practice are mixed throughout: most lessons end with something you run, observe and explain, not just something you read.
Your Practice Folder and Stack
You will keep one practice folder, ~/pmg-practice, for the whole course.
It grows lesson by lesson. Inside it, a Docker Compose file describes the
stack, and Compose names everything it creates with the project name pmg:
containers such as pmg-prometheus-1, volumes such as pmg_prometheus-data.
That prefix matters, because it lets every cleanup command remove only what
this course created.
Every service is published only on 127.0.0.1, the address that other
machines cannot reach, and only on ports from 19000 to 19499 so they are
unlikely to clash with anything else you run:
| Service | Address on your computer | Added in |
|---|---|---|
| Prometheus | http://127.0.0.1:19090 | Start Here |
| Shop | http://127.0.0.1:19200 | Start Here |
| Second shop instance | http://127.0.0.1:19201 | Scraping and Discovery |
| Grafana | http://127.0.0.1:19300 | Start Here |
| node_exporter | http://127.0.0.1:19100 | Scraping and Discovery |
| blackbox_exporter | http://127.0.0.1:19115 | Scraping and Discovery |
| Alertmanager | http://127.0.0.1:19093 | Rules and Alerting |
| Webhook receiver | http://127.0.0.1:19400 | Rules and Alerting |
The course pins exact versions: Prometheus 3.13.5, which belongs to a long-term-support line maintained until 31 July 2027, Grafana 13.2.4 and Alertmanager 0.34.1. Menus and messages in the lessons are written for these versions; newer versions may differ.
Checkpoints. At the end of each module the course gives you a complete
copy of what the practice folder should contain at that point: a download
under Practice files at the top of the module's last lesson and the next
module's first lesson, with a README that explains how to swap it in. If an
exercise goes wrong in a way you cannot untangle, or you want to start a
module without doing the previous one, you can replace your folder with the
checkpoint and carry on. The troubleshooting exercises and the final
challenge use their own separate folders, also downloaded there, so they
cannot damage your main stack. You unzip them with the unzip command, which
macOS includes; on Ubuntu, including under WSL 2, install it with
sudo apt install unzip.
The Three Study Views
Every lesson has three views of the same material:
- Full Course teaches the topic: the problem, the concepts, a worked example, the practical task with what success looks like and what to check when it differs, and a question to test yourself.
- Revision helps you recall the reasoning after you have studied the lesson: the distinctions, decisions and common mistakes, with recall questions. It links back to the Full Course for procedures.
- Quick Reference collects the syntax, commands, decision tables and diagnostic cues for later lookup. It keeps the safety conditions, such as which folder to run a command in and what a cleanup deletes.
Start with Full Course for any lesson you have not studied. The shorter views assume you have.
What the Course Does Not Cover
The course is about metrics-based monitoring with one Prometheus server. It does not teach logs or traces tools, Kubernetes monitoring with operators or Helm charts, long-term or clustered storage, writing exporters in Go, Grafana Cloud or Enterprise features, or delivery to real email, chat or paging services. Notifications go to a small local receiver that prints them, so you can see exactly what would have been sent. Some of these appear briefly as boundaries so you know where they fit.
What Completion Means
Marking a lesson complete records that you studied it. It is not a grade and not proof of skill. The practical tasks define observable success (a target that is up, a query that returns the expected labels, a notification that arrives) so that you can judge your own work, and the final challenge asks you to apply everything without step-by-step instructions. Completing the course does not certify you or guarantee a job.
Check Your Understanding
- Which folder and Compose project does the course use, and why does the project name matter when cleaning up?
- You broke your practice folder halfway through the PromQL module. What can you do without redoing every earlier lesson?
- Which of these does the course teach: delivering alerts to a real chat service, alerting on a service-level objective, collecting traces?
Answers
~/pmg-practice, Compose projectpmg. Everything Compose creates carries thepmgname, so cleanup can target exactly the course's containers, volumes and network and nothing else on your machine.- Replace the folder with the checkpoint for the end of the previous module (Scraping and Discovery) and continue from the start of the PromQL module.
- Only alerting on a service-level objective. Real chat delivery is shown as configuration shape only, and traces are outside the course.