2 — Hands-On Labs
Overview
This chapter is not a new tutorial. Everything a PCA candidate needs to touch with their hands — installing Prometheus, wiring up scraping, instrumenting an app, and writing alert rules — is already written elsewhere in this book, with real commands and real output. What’s missing is a single ordered path through it that mirrors how the exam actually exercises the material: set up the server, get it scraping something, look at the metric types it produces, then react to them with alerts.
Treat this chapter as the index for a lab session, not as content in its own right. Each step below links to the chapter that carries the actual walkthrough — don’t duplicate those commands here; follow the link and run them there.
Lab 1 — Install Prometheus
Start with the server itself: what the binary actually contains (scrape manager, TSDB, rule engine, query engine) and the real deployment shapes — systemd unit, Docker container, or bare binary on a VM.
Lab 2 — Configure Scraping
Once the server is running, point it at something. This is where target discovery lives — static configs as the baseline, then the dynamic mechanisms (Kubernetes, cloud APIs, DNS, file-based SD) that replace hand-maintained target lists in anything beyond a single-host demo.
Lab 3 — Instrument & Observe Metric Types
This is the lab with the most hands-on surface area, and it’s covered in full elsewhere — the actual
demo commands (running exporters, hitting /metrics endpoints, telling a counter from a gauge from
a histogram in live output) live in the metrics deep-dive chapter, not here. Follow the link and run
the demo there rather than expecting a second copy of the same steps in this chapter.
Lab 4 — Configure Alerts
With real metrics flowing, close the loop: write an alerting rule against them, understand how it evaluates, and see it reach Alertmanager.
Not Yet Covered
Two labs that a complete PCA hands-on path would normally include have no source material anywhere in this book yet:
- Build Dashboards — no Grafana dashboard-building content exists in this book at this time.
- Debug Failures — no troubleshooting/failure-injection content exists in this book at this time.
Rather than fabricate steps for either, they’re listed here as open gaps. Fill them in as their own chapters first, then extend this lab index to point at them.
Metadata
| Author | Amit Singh |
| Scope | prometheus |
Local graph
Related notes
1 — PCA Exam Objectives
The Prometheus Certified Associate exam blueprint, a study strategy for covering it, and the pitfalls that trip up otherwise-competent candidates.
3 — Practice Exams
Practice questions at increasing difficulty (beginner, intermediate, scenario-based) plus full-length mock exams for PCA readiness.
3 — Prometheus in the Observability Ecosystem
Where Prometheus sits in the CNCF landscape — its pull-based cloud-native origins, its companion projects, and where this book does (and doesn't yet) connect it to the wider stack.
2 — Exporters
What a Prometheus exporter is, installing Node Exporter as a systemd service, and monitoring the container runtime itself via Docker Engine metrics and cAdvisor.