Check alerting and recording rules against your scrape interval — rate windows too short to return a value, alerts with no for, and self-referencing rules.
Waiting for a rule file
Checked against a 15s scrape interval.
The scrape interval above is not decoration. rate() needs at least two samples in its window, so rate(x[10s]) at a 15s interval holds at most one and evaluates to nothing — and an alert on nothing never fires. The same expression is fine at a one-second interval and useless at a minute.
The findings appear here
An alert with no for duration, a rate window too short to produce a value, a counter compared raw, and a recording rule that reads what it writes.
This reads the rule file's structure and the durations and function calls inside each expression. It does not parse PromQL as a language, evaluate anything, or know which metrics exist — so a rule with no findings may still reference a metric that is never produced.
Prometheus Rule Inspector runs entirely on your device — no Prometheus server is contacted and no expression is evaluated.
You’re on the Free plan. Compare plans
The scrape interval is an input, which is the point. Several of the most valuable checks are only answerable relative to it. `rate()` needs at least two samples in its window, so `rate(x[10s])` at a 15-second scrape interval evaluates to nothing at all — and an alert on nothing never fires, which is the quietest possible failure. Under four intervals it is merely noisy.
The same expression is fine at a one-second interval and useless at a minute, so a tool that checks it without knowing your interval is guessing. This asks.
An alert with no `for` fires on a single evaluation: one slow request, one GC pause, and the phone rings. A `for` shorter than the scrape interval is worse than none at all, because it looks like protection and can only ever see one sample.
A recording rule that reads the metric it writes is the error that produces no error. Each evaluation reads the sample the previous one wrote, so the value compounds every interval and the series drifts steadily away from the truth with nothing reported anywhere.
PromQL is not parsed as a language. The expression checks read durations and function names out of the text, so they cannot tell you an expression is malformed or that a metric is never produced — a rule with no findings may still reference nothing.
Check the rate window against your scrape interval. `rate()` needs two samples in the window; with a window shorter than two intervals it returns no samples, the comparison has nothing to compare, and the alert can never fire. Nothing reports an error.
Without one it fires the first time the expression is true for a single evaluation — one slow request or one garbage collection pause is enough. A `for` longer than the evaluation interval lets a transient spike resolve itself before anyone is woken.
It uses only the last two samples in the window, so each evaluation sees a different pair and the result jumps around. A `for` duration cannot smooth that, because the condition keeps flickering. irate() is good for graphs and poor for alerting; rate() is the one you want.
No, and it cannot. There is no Prometheus server involved and PromQL is not parsed as a language — the checks read durations and function calls out of the expression text. A rule referencing a metric nothing produces will pass here and never fire in production.