Big Data

Monitoring with Prometheus and Grafana

Measure your servers and applications, build professional dashboards and get alerts before your users notice a problem. 20 labs with Prometheus 3 and Grafana 13, based on the official documentation.

Beginner · 20 hours · 20 lessons · Course language: Spanish and English

A hands-on observability course with the two most widely used tools in the world. You start Prometheus and Grafana with Docker Compose, collect metrics from your servers with Node Exporter and learn PromQL from scratch: selectors, rate, aggregations, functions and percentiles. You instrument a Python application with the official library, design metrics with good labels and avoid cardinality explosions. In Grafana you build dashboards as code, with panels, units, thresholds and variables. You set up recording and alerting rules, test them with promtool, and route notifications with Alertmanager and Grafana Alerting. You finish by monitoring websites with Blackbox Exporter, discovering targets automatically, securing your monitoring and taking it to AWS, Azure and Google Cloud, with a complete final project. Every command is explained and every result is real. The first 3 classes are free and include a video. The lessons, quizzes and videos are in English; the lab files keep their original Spanish names, and every lesson explains them.

What you will learn

  • Run a monitoring stack with Prometheus, Grafana and exporters in Docker Compose
  • Write PromQL queries: selectors, rate, aggregations, functions and percentiles
  • Instrument a Python application with counters, gauges and histograms
  • Design metrics with good names and labels, without cardinality explosions
  • Build Grafana dashboards as code, with variables, units and thresholds
  • Create and test alerting rules, and route notifications with Alertmanager and Grafana Alerting
  • Monitor websites, discover targets automatically and take monitoring to the cloud

Skills

Prometheus, PromQL, Grafana, Node Exporter, Application instrumentation, Alertmanager, Grafana Alerting, Blackbox Exporter, Docker Compose, Observability on AWS, Azure and Google Cloud

Program

Module 1: First steps (free classes)

Observability, Prometheus, Node Exporter, your first queries and your first Grafana dashboard.

Project: A monitoring stack for your computer with Prometheus, Node Exporter and Grafana.

  1. Observability and your first Prometheus: Metrics, logs and traces; how Prometheus works and your first server with Docker Compose.
  2. Node Exporter and your first PromQL queries: Your computer's CPU, memory and disk metrics, reloading the configuration and queries with promtool.
  3. Grafana: your first dashboard: Grafana with the data source ready, Explore and a dashboard with your first panels.

Module 2: PromQL

Metric types, selectors, rate, aggregations, functions and operators.

Project: The CPU, memory and disk usage queries you'll use in your dashboards.

  1. Metric types and the exposition format: Counter, gauge, histogram and summary; HELP, TYPE and labels in /metrics.
  2. Selectors, vectors and time in PromQL: The =, !=, =~ and !~ matchers; instant and range vectors; offset and range queries.
  3. rate, increase and aggregations: Why counters need rate; sum, avg, max, count, topk, by and without.
  4. Operators and functions: percentages, comparisons and predictions: Arithmetic between vectors, filters with comparisons, on and ignoring, absent and predict_linear.

Module 3: Instrument your applications

The official Python library, histograms and percentiles, labels and Pushgateway.

Project: An instrumented payments API, with its p95 latency measured.

  1. Instrument a Python application: prometheus_client: Counter, Gauge and Histogram in a payments API inside Docker.
  2. Histograms and latency percentiles: Buckets, histogram_quantile, the 95th percentile and the percentage of fast requests.
  3. Labels, cardinality and Pushgateway: Names and labels following best practices, the cost of cardinality and metrics from batch processes.

Module 4: Dashboards with Grafana

Dashboards as code, panels, units, thresholds and variables.

Project: A servers and API dashboard that installs itself when Grafana starts.

  1. Dashboards as code: Provisioning data sources and dashboards with files, and Grafana's API.
  2. Panels: time series, stat, gauge and tables: Panel types, units, thresholds, colors and legends in the dashboard's JSON model.
  3. Variables and dynamic dashboards: Query variables with label_values, multi-select and repeating panels.

Module 5: Alerts

Recording and alerting rules, tests with promtool, Alertmanager and Grafana Alerting.

Project: Tested alerts that reach a notification receiver.

  1. Recording and alerting rules in Prometheus: Recording rules, alerting rules, for, labels and annotations; unit tests with promtool.
  2. Alertmanager: routes, grouping and silences: Connecting Prometheus with Alertmanager, routing alerts, grouping, inhibiting and silencing with amtool.
  3. Grafana Alerting: Alert rules, contact points and notification policies provisioned as code.

Module 6: Production and final project

Service discovery, Blackbox Exporter, storage, security, the cloud and a complete project.

Project: The complete monitoring of an online store: server, API, website, dashboards and alerts.

  1. Service discovery and relabeling: Targets from files (file_sd), relabel_configs and metric_relabel_configs.
  2. Monitor websites with Blackbox Exporter: HTTP probes from outside, availability, response times and certificates.
  3. Storage, security and the cloud: Retention and the TSDB, basic authentication, remote_write and managed services on AWS, Azure and Google Cloud.
  4. Final project: complete monitoring of an online store: Server, API, website, dashboards and alerts in a single compose.yaml, with a simulated incident.

Prerequisites

  • A Windows, macOS or Linux computer with 8 GB of RAM
  • Docker Desktop installed and basic use of Docker (you can learn it for free in our course Docker from Scratch)
  • Basic use of the terminal. You don't need to know how to program: the examples' code is already written and explained

Next courses

  • Docker from Scratch: Containers, Images and Docker Compose · Beginner · 20 hours · Free course
    A free, 100% hands-on course: run containers, build your own images with a Dockerfile, keep data in volumes, connect services on networks and start complete applications with Docker Compose in 20 labs.
  • Coding Agents with Codex and Claude · Advanced · 25 hours
    Program with AI agents like a professional team: Claude Code, OpenAI Codex and your own agents with the Claude Agent SDK.

See all courses