🌐
Prometheus
prometheus.io › docs › prometheus › latest › querying › functions
Query functions | Prometheus
The info function is an experiment to improve UX around including labels from info metrics . The behavior of this function may change in future versions of Prometheus, including its removal from PromQL.
🌐
Chronosphere
docs.chronosphere.io › investigate › querying › promql › apply-functions
Applying PromQL functions - Chronosphere Documentation
July 9, 2026 - PromQL functions perform calculations with and on your metrics data, letting you complete complex processing with pre-built operations. Each function takes different arguments, but typically at minimum, an instant or range vector.
People also ask

What is PromQL?
PromQL (Prometheus Query Language) is the query language built into Prometheus for selecting, filtering, and aggregating time series data. You use it to write expressions that power dashboards, alerts, and ad-hoc metric analysis.
🌐
last9.io
last9.io › blog › promql-cheat-sheet
PromQL Cheat Sheet: Queries, Functions, and Labels | Last9
How do I filter by label values in PromQL?
Use curly brace selectors: http_requests_total{job="api", status="500"} for exact matches, {status=~"5.."} for regex matches, and {status!="200"} to exclude a value. Multiple label filters combine with AND logic.
🌐
last9.io
last9.io › blog › promql-cheat-sheet
PromQL Cheat Sheet: Queries, Functions, and Labels | Last9
How do I find the top N series by a metric in PromQL?
Use topk(N, expr). For example, topk(5, sum(rate(http_requests_total[5m])) by (service)) returns the 5 services with the highest request rate. Use bottomk() for the lowest values.
🌐
last9.io
last9.io › blog › promql-cheat-sheet
PromQL Cheat Sheet: Queries, Functions, and Labels | Last9
🌐
Medium
medium.com › @suchitasharma1106 › a-comprehensive-guide-to-grouping-and-functions-in-promql-cc3c438be320
A Comprehensive Guide to Grouping and Functions in PromQL | by Suchita Sharma | Medium
October 7, 2024 - PromQL comes with a variety of built-in functions to help users analyze metrics. Functions in PromQL allow transformations, aggregations, and mathematical operations on time-series data.
🌐
GitHub
github.com › prometheus › prometheus › blob › main › promql › functions.go
prometheus/promql/functions.go at main · prometheus/prometheus
type FunctionCall func(vectorVals []Vector, matrixVals Matrix, args parser.Expressions, enh *EvalNodeHelper) (Vector, annotations.Annotations)
Author: prometheus
🌐
Last9
last9.io › blog › promql-cheat-sheet
PromQL Cheat Sheet: Queries, Functions, and Labels | Last9
September 12, 2024 - PromQL cheat sheet: quick diagnostic queries, aggregation functions, label filtering, SLO tracking, capacity planning, and multi-cluster patterns for Prometheus monitoring.
🌐
Elastic
elastic.co › docs › reference › elasticsearch › query languages › promql › promql functions
PromQL functions | Elasticsearch Reference
Functions that convert between scalars and instant vectors. ... Returns the sample value of a single-element instant vector as a scalar. If the input vector does not have exactly one element, scalar returns NaN.
🌐
Grafana
grafana.com › blog › inside-promql-a-closer-look-at-the-mechanics-of-a-prometheus-query
Inside PromQL: A closer look at the mechanics of a Prometheus query | Grafana Labs
October 9, 2024 - PromQL is defined in great detail ... http_requests_total{status="200"}. Functions, such as abs to take the absolute value or rate to compute the rate of increase per second....
🌐
Better Stack
betterstack.com › community › guides › monitoring › promql
The Beginner’s Handbook to PromQL | Better Stack Community
February 26, 2025 - The most important functions are those that manipulate and analyze time series data, including rate calculations, deltas, and histogram analysis which we'll explore in some upcoming sections.
Find elsewhere
🌐
SigNoz
signoz.io › guides › essential promql cheat sheet - master prometheus queries
Essential PromQL Cheat Sheet - Master Prometheus Queries | SigNoz
November 29, 2024 - PromQL includes a wide range of functions that simplify tasks like rate calculation, data aggregation, and histogram analysis.
🌐
VictoriaMetrics
victoriametrics.com › blog › prometheus monitoring: functions, subqueries, operators, and modifiers
Prometheus Monitoring: Functions, Subqueries, Operators, and Modifiers
April 25, 2025 - This function looks at all data points collected over the past 3 minutes and returns the highest value to represent those samples. ... In the example above, max_over_time is evaluated at every 5-minute step between 00:10 and 00:30. Each time, it looks back over the previous 3 minutes, collects the samples, and returns the maximum value found in that range. PromQL and MetricsQL both support many rollup functions.
🌐
Prometheus
prometheus.io › docs › prometheus › latest › querying › basics
Querying basics | Prometheus
Both float samples and histogram ... writing PromQL queries. (By convention, time series containing float counters have a name ending on _total to help with the distinction.) Since histogram samples “know” their counter or gauge flavor, this allows reliable warnings about mismatched operations. For example, applying the rate function to gauge floats ...
🌐
BytePlus
docs.byteplus.com › en › docs › vmp › Basic-PromQL-functions
PromQL common functions--Vital Managed Service for Prometheus-Byteplus
August 19, 2025 - PromQL common functions · Billing · Billing overview · Billing methods · Pay-as-you-go · Package · Package Overview · Purchasing packages · Viewing Packages · Renew Package · Canceling packages and changing package specifications · Price calculator ·
🌐
Medium
valyala.medium.com › promql-tutorial-for-beginners-9ab455142085
PromQL tutorial for beginners and humans | by Aliaksandr Valialkin | Medium
September 15, 2023 - VictoriaMetrics extends these functions with more convenient label manipulation functions: label_set — sets additional labels to time series · label_del — deletes the given labels from time series · label_keep — deletes all the labels from time series except the given labels · label_copy — copies label values to another labels ... Sometimes it is necessary to return multiple results from a single PromQL query.
🌐
Last9
last9.io › blog › prometheus-functions
Prometheus Functions: How to Make the Most of Your Metrics | Last9
February 28, 2025 - The resets() function helps you identify when this happens: ... This returns the number of counter resets within the last hour, which can be a useful indicator of service stability. To detect sudden changes in rates, you can compare the short-term rate to a longer-term average: ... This alerts when the 5-minute rate differs from the 1-hour rate by more than 30%, indicating a significant change in traffic patterns. PromQL supports powerful label matching techniques that let you zero in on exactly the metrics you care about:
🌐
Prometheus
prometheus.io › docs › prometheus › latest › querying › operators
Operators | Prometheus
All other operations result in the removal of the corresponding element from the output vector, flagged by an info-level annotation. The + and - operations should generally only be applied to gauge histograms, but PromQL allows them for counter histograms, too, to cover specific use cases, for which special attention is required to avoid problems with unaligned counter resets.
🌐
MetricFire
metricfire.com › blog › understanding-the-prometheus-rate-function
How the Prometheus rate() function works | MetricFire
March 12, 2026 - PromQL uses two types of arguments - range and instant vectors. Range vectors have a time dimension, while instant vectors represent the most recent data point. rate() and similar functions require range arguments for trend analysis.
🌐
DEV Community
dev.to › godofgeeks › prometheus-query-language-promql-deep-dive-51f3
Prometheus Query Language (PromQL) Deep Dive - DEV Community
March 12, 2026 - You're not shoehorning traditional data models into a time-series context. Powerful Aggregations and Functions: PromQL offers a rich set of functions for summing, averaging, counting, calculating rates, and much more.
🌐
Logz.io
logz.io › home › blog › how to › an intro to promql: basic concepts & examples
An Intro to PromQL: Basic Concepts & Examples | Logz.io
September 2, 2023 - Prometheus supports a large number of functions, aggregation operators, and binary operators. Other features include hashed comments by line (like many other languages) and subqueries for instantaneous queries when triggered. Subqueries, a themselves a feature of PromQL’s nested expression capabilities, allow for some sophisticated querying.
🌐
Compile N Run
compilenrun.com › prometheus tutorial › promql (prometheus query language) › promql functions
PromQL Functions | Compile N Run
Use irate for fast-changing counters or when you need to see rapid changes. Use increase when you want the absolute increase rather than a per-second rate. PromQL offers various mathematical functions to transform your data.