🌐
Prometheus
prometheus.io › docs › prometheus › latest › querying › examples
Query examples | Prometheus
Join PromCon EU 2026 , the Prometheus users conference, on October 7–8, 2026 in Munich. PromCon EU 2026 — Oct 7–8, Munich. ... Return a whole range of time (in this case 5 minutes up to the query time) for the same vector, making it a range vector:
🌐
Last9
last9.io › blog › prometheus-query-examples
Essential Prometheus Queries: Simple to Advanced | Last9
June 15, 2026 - This guide covers practical Prometheus query examples from basic metric selection to advanced alerting and anomaly detection.
🌐
Prometheus
prometheus.io › docs › prometheus › latest › querying › basics
Querying basics | Prometheus
In this example, we select all the values recorded less than 5m ago for all time series that have the metric name http_requests_total and a job label set to prometheus: ... The offset modifier allows changing the time offset for individual instant and range vectors in a query.
🌐
SigNoz
signoz.io › blog › prometheus query tutorial with examples
Prometheus Query Tutorial with examples | SigNoz
August 1, 2022 - Understanding how the Prometheus time-series engine stores data gives you an idea of intended query results before, while, and as your expressions execute. For example, if the data you're looking for has different timestamps/or is just unknown in complexity, and you wish to aggregate (sum or average) occurrences, it might be best for you to create subqueries that end with tabular views.
🌐
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 - PromQL, short for Prometheus Querying Language, is the main way to query metrics within Prometheus. You can display an expression’s return either as a graph or export it using the HTTP API. PromQL uses three data types: scalars, range vectors, and instant vectors. It also uses strings, but only as literals. This intro will provide basic PromQL examples and concepts to understand as you get used to Prometheus queries.
🌐
Grafana
grafana.com › docs › grafana › latest › datasources › prometheus › query-editor
Prometheus query editor | Grafana documentation
For example, sum(rate(metric[5m])) by (service) is far cheaper than querying all individual Pod-level series. Use recording rules for repeated queries: If a dashboard panel queries the same expensive expression on every load, create a Prometheus ...
🌐
PagerTree
pagertree.com › blog › promql-cheat-sheet-a-quick-guide-to-prometheus-query-language
✨ PromQL Cheat Sheet: A Quick Guide to Prometheus Query Language | PagerTree
June 13, 2023 - A quick guide to Prometheus Query Language (PromQL) with examples for querying time series data, aggregation functions, and range vectors.
🌐
Sysdig
sysdig.com › blog › prometheus-query-examples
Prometheus query examples for monitoring Kubernetes | Sysdig
April 1, 2026 - In this article, you will find 10 practical Prometheus query examples for monitoring your Kubernetes cluster.
🌐
Prometheus
prometheus.io › docs › prometheus › latest › querying › functions
Query functions | Prometheus
If the old target_info series is ... the query above will fail for up to 5m (the lookback delta) because it will find a conflicting match with both the old and the new version of target_info. The info function not only resolves this conflict in favor of the newer series, it also simplifies the syntax because it knows about the available info series and what their identifying labels are. The example query looks ...
Find elsewhere
🌐
Medium
medium.com › @Nitish_Mane › promql-examples-by-metric-type-2eb3ffb6aa8c
PromQL examples by Metric Type — Part 4 | by Nitish Mane | Medium
October 14, 2024 - For example, for http_request_duration_seconds, Prometheus automatically creates: http_request_duration_seconds_bucket: Tracks the count of requests in each bucket. http_request_duration_seconds_sum: Total sum of all request durations. ...
🌐
Medium
medium.com › @ronyaurora › promql-101-beginner-prometheus-query-examples-with-grafana-4df701189a94
PromQL 101: Beginner Prometheus Query Examples With Grafana | by Rony Aurora | Medium
December 16, 2024 - To compare the same query in two different periods, use 2 identical queries, and apply the Prometheus offset modifier to one of them. For example, to compare numbers from the last hour with the same period yesterday, use offset 1d:
🌐
Logz.io
docs.logz.io › user guide › infrastructure monitoring › introduction to prometheus › prometheus examples and best practices
Prometheus Examples and Best Practices | Logz.io Docs
Searching a label inside a time series changes the query. You need to add the name of the time series, and the value you're looking for: nameOfTimeSeries{label=~"value.+"} For example, if the time series you're querying has the following labels: * namespace * container * pod * user To search for a namespace label that starts with **kub**, run the following query: `container_memory_working_set_bytes{namespace=~"kub.+"}`
🌐
Hexmos
hexmos.com › freedevtools › c › prometheus › prometheus
Prometheus Cheatsheet - PromQL Queries & Configuration Cheatsheet | prometheus Reference | Online Free DevTools
Query: label_values(container_last_seen{container_label_com_docker_swarm_service_name=~"proxy_traefik", container_label_com_docker_swarm_node_id=~".+"}, container_label_com_docker_swarm_node_id)
🌐
InfraCloud
infracloud.io › blogs › promql-prometheus-guide
Prometheus Query Language - Prometheus Definitive Guide Part II
April 9, 2021 - For example, let’s take the metric prometheus_http_requests_total, which counts the total number of HTTP requests. We can extract the rate of growth of requests from this by using the rate function (requests per second).
🌐
DevOpsSchool.com
devopsschool.com › blog › prometheus-promql-example-query
Prometheus PromQL Example Query
For instance, the following query would return week-old data for all the time series with node_network_receive_bytes_total name: node_network_receive_bytes_total offset 7d · If we have two different metrics with the same dimensional labels, we can apply binary operators to them and elements on both sides with the same label set will get matched and propagated to the output. For example, this expression returns the unused memory in MiB for every instance (on a fictional cluster scheduler exposing these metrics about the instances it runs): (instance_memory_limit_bytes – instance_memory_usage_bytes) / 1024 / 1024
🌐
Better Stack
betterstack.com › community › guides › monitoring › promql
The Beginner’s Handbook to PromQL | Better Stack Community
February 26, 2025 - Summaries in Prometheus provide precomputed quantiles, allowing you to directly query specific percentiles without extra calculations. For example, to get the 95th percentile of HTTP request durations, you can simply use:
🌐
SigNoz
signoz.io › guides › essential promql cheat sheet - master prometheus queries
Essential PromQL Cheat Sheet - Master Prometheus Queries | SigNoz
November 29, 2024 - For example: ... This can reveal bottlenecks or mismatches in service interactions. ... This query lists the top 10 metrics with the highest number of time series. ... This query returns 0 for any missing data points in http_requests_total.
🌐
Is It Observable
isitobservable.io › home › observability › prometheus › how to build a promql (prometheus query language)
How to build a PromQL (Prometheus Query Language) | Is It Observable
March 18, 2025 - The Prometheus Query Language is key to making full use of Prometheus. This blog post will show you how to create and use various PromQL queries.
🌐
DEV Community
dev.to › sre_panchanan › decoding-promql-a-deep-dive-into-prometheus-query-language-4h23
Decoding PromQL: A Deep Dive into Prometheus Query Language - DEV Community
November 12, 2024 - Strings in PromQL are enclosed in either single or double quotes, as shown in these examples defining the string literals "metric_name" or 'metric_name'. ... This query selects time series with the label "job" having the value "api" and the label "environment" having the value 'staging'. The instant vector in Prometheus is a set of time series data, each associated with a single value at a specific point in time.
🌐
Prometheus
prometheus.io › docs › prometheus › latest › querying › api
HTTP API | Prometheus
The following example formats the expression foo/bar: curl 'http://localhost:9090/api/v1/format_query?query=foo/bar' ... This endpoint is experimental and might change in the future. It is currently only meant to be used by Prometheus' own web UI, and the endpoint name and exact format returned ...