`promtool test rules` reports `FAILED: alertname: CheckoutErrorBudgetBurnFast, time: 10m, exp:[0: Labels:{alertname="CheckoutErrorBudgetBurnFast", severity="page"}], got:[]`.
IntermediateTroubleshootingPrometheus SLIs & Recording Rules
Answer
Likely causes → At eval_time: 10m the alert is not yet firing: the input series do not have enough history for the [1h] window to exceed the threshold, the for: duration has not elapsed, or the expected labels miss labels the rule adds (like slo).
Diagnose → Evaluate the recording rules at that time in the test with promql_expr_test, and print what the alert produces at later times.
Fix → Move eval_time later (after the long window is above threshold plus for:), increase the error ratio in input_series, and list every label in exp_labels, including ones from recording rules.
Prevent → Keep a positive and a negative test case per alert tier, and document expected detection time in the test.
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