Stage 2 · Lesson 3 of 6
PromQL you use every week
is the query language behind dashboards, and alerts. A handful of patterns cover most of the work. rate(counter[5m]) turns a counter into a per-second rate. sum by (service) (...) aggregates across pods while keeping one .
An error ratio divides the rate of 5xx responses by the rate of all responses. histogram_quantile(0.99, sum by (le) (rate(bucket[5m]))) reads p99 latency from a histogram. Recording rules precompute expensive expressions, such as the error ratio per service, so dashboards and alerts stay fast and consistent. Practise in the Prometheus expression browser against a real app.
Common trapsumming before taking rate(), or dropping the le label before histogram_quantile(), which returns wrong numbers without any error.
A question to check yourself, an AI practice session and 2 cheat sheet entries come with the full roadmap. Unlock
Resources for this stage
Start with· follow one of these
- GuideFreePrometheus Documentation
Prometheus · Intermediate
Free: the first steps guide, then the querying basics, functions and histograms pages
- CoursePaidPrometheus Certified Associate (PCA) Prep Course
KodeKloud · Intermediate · Subscription
Paid, hands-on labs for PromQL, recording rules, Alertmanager and Kubernetes monitoring
Practise
Keep handy
Also worth your time
The chapter that defines the four golden signals and what makes monitoring worth paging on