Skip to main content

Prometheus Query Builder

Build PromQL queries visually. Select a metric, add label filters, choose an aggregation and range, then copy your ready-to-use query. No PromQL memorization required.

✓ Live PromQL preview ✓ rate / irate / histogram_quantile ✓ Dynamic label filters ✓ Recording rule output

Quick-select Common Metrics

Query Builder

Generated PromQL Query

 

Frequently Asked Questions

What is PromQL?▼

PromQL (Prometheus Query Language) is the functional expression language used to query Prometheus metrics. It lets you select and aggregate time series data in real time. PromQL queries return instant vectors, range vectors, scalars, or strings.

What are label matchers and which operators are available?▼

Label matchers filter which time series are selected. The four operators are: = (exact match), != (not equal), =~ (regex match), and !~ (regex not match). For example, {job=\"api-server\", status=~\"5..\"} selects series where job is api-server and status matches 5xx.

What is the difference between rate() and irate()?▼

rate() calculates the per-second average rate over the full range window, smoothing out spikes. irate() uses only the last two data points, making it more responsive to sudden spikes but noisier. Use rate() for most alerting and irate() for burst detection.

When should I use increase() instead of rate()?▼

Use increase() when you want the total count of events over a time window. increase(http_requests_total[1h]) gives requests in the last hour; rate(http_requests_total[5m]) gives requests/sec averaged over 5 minutes.

What do the by() and without() clauses do?▼

by() keeps only listed labels and aggregates everything else together. without() drops listed labels and keeps all others. They are inverses of each other. Use by(job) for per-job totals; use without(instance) to remove high-cardinality labels.

How do I build a histogram quantile query?▼

Use histogram_quantile(phi, rate(metric_bucket[range])). For example: histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m])) gives the p95 latency. The metric must be a Prometheus histogram type with _bucket suffix.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →