PromQL level 1: selectors, rate and aggregations

12 min
Audience
beginner, lessons 01 to 03 read
Duration
45 to 60 min
Module
2/7
Target skill
write on your own the three queries that do 80% of the work (selector, rate(...[1m]), sum by (...)), read an error from the /api/v1/query API and know why a result is empty

In one picture

You have a notebook of readings: 3000 series, one value every 15 seconds. PromQL is the language in which you ask the notebook three questions:

  1. Which ones? The selector picks series by their name and labels: http_requetes_total{route="/cours"}.
  2. How fast? A counter is never read as is; rate(...[1m]) turns "2914 requests since startup" into "3.6 requests per second".
  3. Grouped how? sum by (route) melts 13 series into 7 readable lines.

Preview — the rest of the lesson is for enrolled readers.

Already enrolled with a code?

Your access is tied to your account, not to this link. Sign in with the same email you used in class: your course is waiting, no need to enter the code again.

Sign inNo account yet? Create one
This lesson is part of the “Metrics: Prometheus end-to-end” module

The first modules of the course are open to everyone. For the rest you have three options: buy this course once and for all, subscribe, or enter the code handed out in class.

Are you a student on this course?

The code is tied to your account: sign in or create an account and it will be applied automatically when you come back.

No account yet? Create one