A 1m-window recording rule returns empty results intermittently. Scrape interval is 30s.
IntermediateTroubleshootingPrometheus SLIs & Recording Rules
Answer
Likely causes → rate() needs at least two samples in the window. With a 30s scrape interval and a 1m window, any missed or delayed scrape leaves only one sample.
Diagnose →
count_over_time(http_requests_total{job="checkout"}[1m])
Fix → Use windows of at least 4x the scrape interval (2m for 30s scrapes); that is why the shortest SLO window is usually 5m. In Grafana use $__rate_interval.
Prevent → Lint recording rules for windows shorter than 4x scrape interval.
More on Prometheus SLIs & Recording Rules
You applied a `PrometheusRule` for your SLO, but `slo:sli_error:ratio_rate5m` returns nothing in Prometheus.Beginner`promtool check rules` fails with `could not parse expression: 1:72: parse error: unexpected right parenthesis ')'`.BeginnerThe availability SLI panel shows `NaN` every night between 02:00 and 05:00.BeginnerYour per-route SLI query fails with `found duplicate series for the match group {route="/api/checkout"} on the right hand-side of the operation`.IntermediatePrometheus logs `vector contains metrics with the same labelset after applying rule labels` for your SLI recording rule.AdvancedYour latency SLI using `le="0.3"` returns an empty result, but the histogram exists.Intermediate