Welcome to the Times of Cloud — Prometheus & Grafana Tutorial. This is a complete, hands-on guide that takes you from zero monitoring experience to confidently building production-grade observability stacks with Prometheus and Grafana.
Who Is This Tutorial For?
- DevOps engineers who want to implement metrics-based monitoring and alerting
- SREs (Site Reliability Engineers) who need to build full observability stacks
- Developers who want to instrument applications with custom metrics
- Platform engineers building monitoring infrastructure for Kubernetes clusters
- Students preparing for CKA, CKAD, or cloud certifications where monitoring is tested
- Anyone who wants to master modern metrics monitoring and visualization
What You Will Learn
By the end of this tutorial, you will be able to:
- Install and configure Prometheus, Grafana, and exporters
- Write PromQL queries for real-world monitoring scenarios
- Build custom Grafana dashboards with variables and annotations
- Instrument applications with Prometheus client libraries
- Set up alerting with Alertmanager (email, Slack, PagerDuty)
- Deploy kube-prometheus-stack on Kubernetes
- Configure service discovery for dynamic environments
- Implement long-term storage with Thanos or VictoriaMetrics
- Apply production best practices (HA, security, cardinality management)
- Build 5 real-world monitoring projects from scratch
Prerequisites
- Basic Linux command-line knowledge
- Docker and Docker Compose basics
- A machine with at least 4 GB RAM (local or cloud VM)
- No prior Prometheus or Grafana experience needed — we start from zero
Tutorial Structure
This tutorial is organized into 16 chapters across 6 areas:
Area 1 — Foundations (Chapters 1–3)
| # |
Chapter |
What You’ll Learn |
| 1 |
Introduction |
What Prometheus and Grafana are, pull vs push, ecosystem overview |
| 2 |
Installation & Setup |
Install Prometheus, Grafana, Node Exporter, Docker Compose stack |
| 3 |
Prometheus Fundamentals |
Time series, metric types, targets, scraping, prometheus.yml |
Area 2 — PromQL (Chapters 4–5)
| # |
Chapter |
What You’ll Learn |
| 4 |
PromQL Basics |
Vectors, selectors, rate, increase, sum, avg, by/without |
| 5 |
PromQL Advanced |
Binary operators, vector matching, recording rules, histogram_quantile |
Area 3 — Exporters & Instrumentation (Chapters 6–7)
| # |
Chapter |
What You’ll Learn |
| 6 |
Exporters |
Node Exporter, Blackbox, cAdvisor, database exporters, custom exporters |
| 7 |
Application Instrumentation |
Client libraries, counters, gauges, histograms, Python/Go/Node.js |
Area 4 — Alerting & Grafana (Chapters 8–10)
| # |
Chapter |
What You’ll Learn |
| 8 |
Alerting |
Alerting rules, Alertmanager, routing, receivers, silences |
| 9 |
Grafana Fundamentals |
Data sources, dashboards, panels, variables, annotations |
| 10 |
Grafana Advanced |
Provisioning, alerting, dashboard as code, API, plugins |
Area 5 — Kubernetes, Discovery & Storage (Chapters 11–13)
| # |
Chapter |
What You’ll Learn |
| 11 |
Kubernetes Monitoring |
kube-prometheus-stack, ServiceMonitor, PodMonitor, Operator |
| 12 |
Service Discovery |
Static, file-based, Kubernetes SD, Consul, relabeling |
| 13 |
Storage & Federation |
Local storage, remote write/read, Thanos, Cortex, federation |
Area 6 — Production, Projects & Wrap-Up (Chapters 14–16)
How to Use This Tutorial
- Follow in order — each chapter builds on the previous one
- Type every command — don’t just read, practice hands-on
- Complete the exercises — each chapter ends with practice exercises
- Build the projects — Chapter 15 ties everything together
- Bookmark and revisit — use this as a reference guide
Let’s begin with Chapter 1 — Introduction.