aggregation operator
A PromQL operator such as sum, count or max that combines many series into fewer, optionally grouped by chosen labels.
In more detail
sum by (route) adds values and keeps only the route label; count tells you how many series matched, a quick way to spot an unexpected dimension. Calculate the rate of each series first and aggregate afterwards, and never average rates or percentiles without their weights.
Example
sum by (route) (rate(http_requests_total[5m]))Related terms
- instant vector — A PromQL result holding one current value for each matching series, with that series' labels kept beside it.
- rate() — The PromQL function that turns a counter into its average increase per second over a time window, handling restarts.
- PromQL — The query language of Prometheus, used to select time series and calculate rates, sums and percentiles from them.
Taught in
- PromQL Basics And Selectors — Full-Stack Observability: Metrics, Tracing & Logging
- Rates And Increases Over Time — Full-Stack Observability: Metrics, Tracing & Logging
- Calculating Percentiles With histogram_quantile — Full-Stack Observability: Metrics, Tracing & Logging
- Six Minutes Nobody Saw: Prometheus In One Outage — Prometheus Certified Associate (PCA) Exam Prep
- Ninety Minutes, No Question Count: Exam Strategy — Prometheus Certified Associate (PCA) Exam Prep
- Where Did Two Hours Go? Prometheus Architecture — Prometheus Certified Associate (PCA) Exam Prep
- Four Thousand Requests Vanished: Rates And Derivatives — Prometheus Certified Associate (PCA) Exam Prep
- Fifteen Lines And No Answer: Aggregating Over Labels — Prometheus Certified Associate (PCA) Exam Prep
- Is The New Version Worse? Binary Operators And Matching — Prometheus Certified Associate (PCA) Exam Prep
- Under A Second, On Average: Histograms — Prometheus Certified Associate (PCA) Exam Prep
- PromQL Sprint: Ten Queries At Minute Twenty Two — Prometheus Certified Associate (PCA) Exam Prep
- Paged Three Minutes Late: Alerting Rules — Prometheus Certified Associate (PCA) Exam Prep
- Twelve Green Panels: Dashboarding Basics — Prometheus Certified Associate (PCA) Exam Prep
- Seventy Seven Percent, Book Now? The Full Mock — Prometheus Certified Associate (PCA) Exam Prep
- One Week, Three Objectives: Final Review — Prometheus Certified Associate (PCA) Exam Prep