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.
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.
Related Products
on GumroadPremium Workflow Pack
Production-grade workflows, architecture guides, and deployment scripts for teams that ship. 10 advanced CI/CD workflows (blue-green, canary, E2E, security), 5 architecture deep-dives, code review checklist, PR process guide, and 5 battle-tested Bash deployment scripts.
Buy on Gumroad →GitHub Actions CI/CD Templates Pack
12 production-ready GitHub Actions workflow templates covering Node.js, Python, Docker, multi-environment deployments, security scanning, and auto-changelog. Copy, paste, ship.
Buy on Gumroad →Developer Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →You Might Also Need
Prometheus Alert Rules Validator
Validate Prometheus alert rules YAML files. Checks PromQL expression syntax, required fields, severity labels, duration formats, and common alerting mistakes.
Open free tool →
Grafana Dashboard JSON Validator
Validate Grafana dashboard JSON files. Detects syntax errors, panel configuration issues, datasource format problems, gridPos layout errors, and Grafana 10+ compatibility issues.
Open free tool →
Grafana Dashboard JSON Builder
Build Grafana dashboard JSON visually. Add time series, stat, and gauge panels with Prometheus query templates and export import-ready dashboard JSON.
Open free tool →
More Free Tools
Related Articles
The Modern DevOps Observability Stack: Grafana, Prometheus, Loki
Build a complete DevOps observability stack with Prometheus for metrics, Loki for logs, Tempo for traces, and Grafana dashboards—includes Docker Compose setup.
Grafana vs Datadog vs New Relic vs Prometheus 2026: Observability Platform Comparison
In-depth comparison of the top observability and monitoring platforms for 2026. Metrics, logs, traces, pricing, alerting, dashboards, and APM — pick the right stack for your infrastructure.
Building Your Observability Stack in 2026: OpenTelemetry + Grafana vs Datadog vs New Relic
A practical guide to building a modern observability stack in 2026 — comparing OpenTelemetry + Grafana OSS, Datadog, and New Relic on cost, setup complexity, features, and real-world tradeoffs.
SLO vs SLA vs SLI: Developer Guide to Reliability Engineering 2026
Understand the difference between SLI, SLO, and SLA in 2026. Learn how to set error budgets, define your first SLO, and use Prometheus, Grafana, and DataDog to track reliability.
Microservices Observability with OpenTelemetry 2026: Tracing, Metrics, Logs
Complete guide to implementing observability in microservices using OpenTelemetry in 2026. Distributed tracing, metrics collection, structured logging, and production-ready setup with Jaeger, Prometheus, and Grafana.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$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.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →