Prometheus subquery. Subqueries make it possible to do a certain class of queries against Prometheus in an ad hoc fashion. The result of a subquery is a range vector. It also shows you how to connect Grafana to Prometheus for flexible data visualisations. May 22, 2025 · Subquery allows you to run an instant query for a given range and resolution. For the longest time subqueries had fundamental issues that made them challenging to add. Jan 28, 2019 · The Prometheus team arrived at a consensus for the syntax of subqueries at the Prometheus Dev Summit 2018 held in Munich. Firstly from a semantic standpoint what interval should they be executed on? Aug 28, 2025 · This guide shows you how to pull metrics into Prometheus, an open-source tool for storing, aggregating, and querying time series data. Sep 20, 2023 · Queries with resolution are executed in the following manner: timeframe is divided into blocks of resolution length, and expression inside of subquery is evaluated at the end if each block. In this post we’ll share a couple of real-life examples of how we use them at Grafana Labs. Then results of each evaluation are gathered according to range provided. Dec 9, 2019 · Subqueries were added to PromQL a while back, but there's more to this feature than it'd seem. So what better way to fully grasp this feature than by breaking it down step by step? Apr 1, 2019 · Ganesh published an explanation of how to use subqueries over on the Prometheus blog. . Nov 11, 2022 · In this blog post we want to understand how you can use subqueries, a feature that has been added to Prometheus in 2019, to calculate a reliability service level indicator (SLI). These are the notes of the summit on subquery support, and a brief design doc for the syntax used for implementing subquery support. aeif xtlnnv fmo wionly pogt nnlme mip ihhg iwdshqk mapj