`rate(http_requests_total[1m])` returns nothing but `http_requests_total` has data
BeginnerTroubleshootingPromQL and recording rules
Answer
Likely causes → The range window holds fewer than 2 samples. With scrape_interval: 60s, a 1m window often has only one sample.
Diagnose → count_over_time(http_requests_total[1m]) returns 1 or less.
Fix → Use a window of at least 4× the scrape interval ([4m] for 60s scrapes), or $__rate_interval in Grafana.
Prevent → Standardise on $__rate_interval in all dashboard panels.
More on PromQL and recording rules
A PromQL query in the UI returns `Empty query result` for a metric you can see on `/metrics`Beginner`rate()` applied to a gauge shows huge spikesBeginnerBinary operation fails: `many-to-many matching not allowed: matching labels must be unique on one side`Advanced`found duplicate series for the match group {pod="api-1"} on the right hand-side of the operation`IntermediateError ratio query returns no data during quiet hoursIntermediate`histogram_quantile` returns `NaN`Intermediate