Week 1: Monitoring Fundamentals — Prometheus

Theme: Understand Prometheus architecture, instrument applications, write PromQL queries.

Learning Objectives

  1. Explain Prometheus architecture (pull model, TSDB, service discovery, federation)
  2. Install and configure Prometheus using helm
  3. Instrument a Go HTTP server with Prometheus client library
  4. Write PromQL queries (rate, irate, histogram_quantile, aggregations)

Reading Materials

Finger Exercises (choose 2)

  1. Install Prometheus via helm install on a local kind/minikube cluster. Verify targets are up.
  2. Write a simple Go HTTP server that exposes custom metrics (http_requests_total, http_request_duration_seconds histogram). Scrape with Prometheus.
  3. Practice 10 PromQL queries on the Prometheus demo instance at demo.promlabs.com. Start with rate(promhttp_metric_handler_requests_total[5m]) and work up to histogram_quantile(0.95, ...).

Project

Build a Go HTTP server with /api/users, /api/orders, /healthz endpoints. Expose:

Deploy to kind, configure Prometheus scrape, verify in Prometheus UI.

Time Budget

ActivityTime
Reading2 hrs
Finger exercises1.5 hrs
Project2.5 hrs
Total6 hrs