promql

Installation
SKILL.md

PromQL Query Patterns

PromQL is a functional query language for time series data. Every query returns either an instant vector (one value per label set at a point in time), a range vector (a sliding window of samples), or a scalar.

Golden rule: rate() and increase() always require a range vector. The range must be at least 4x the scrape interval to avoid gaps. For a 60s scrape interval, use [5m] minimum.


Rate and counter queries

Rate (per-second average over a window):

rate(http_requests_total[5m])

Rate with label aggregation — "sum then rate" is wrong, always rate then sum:

Related skills
Installs
302
Repository
grafana/skills
GitHub Stars
38
First Seen
Apr 14, 2026