Complete PromQL toolkit with generation and validation capabilities
94
94%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Advisory
Suggest reviewing before use
for Clause in Alerting RuleA platform engineer submitted the following Prometheus alerting rule to monitor HTTP error rates. The rule should fire when the error rate exceeds 5% for a sustained period, not on transient spikes.
groups:
- name: api-alerts
rules:
- alert: HighErrorRate
expr: |
rate(http_requests_total{job="api-service",status=~"5.."}[5m])
/
rate(http_requests_total{job="api-service"}[5m])
> 0.05
labels:
severity: critical
annotations:
summary: "High error rate on API service"
description: "Error rate is {{ $value | humanizePercentage }}"Produce two output files:
alert-review.md — a validation report that:
for clause and explains why it causes alert storms on
transient spikes.rate() on a counter).for duration and explains the trade-off between sensitivity
and stability.alert-corrected.yaml — the corrected alerting rule with:
for clause added with an appropriate duration.Produce alert-review.md and alert-corrected.yaml.