Alert Rule Builder
A threshold-based alert rule editor: per-rule metric, aggregation, comparison operator, threshold, 'for' duration and severity, with enable toggles and a live PromQL-style expression plus a YAML/JSON preview with copy.
npx shadcn@latest add https://rocket.gozturk.dev/r/alert-rule-builder.jsonfor
avg(http_error_rate) > 1% for 5m
for
p95(http_p95_latency) > 300ms for 10m
for
max(db_connections_used) >= 90% for 15m
2/3 enabled
- alert: High error rate on checkout
expr: avg(http_error_rate) > 1
for: 5m
severity: critical
enabled: true
- alert: Elevated API latency
expr: p95(http_p95_latency) > 300
for: 10m
severity: warning
enabled: true
- alert: Postgres connections saturated
expr: max(db_connections_used) >= 90
for: 15m
severity: warning
enabled: false