Files
mtusi2026lab7/infra/otel/alerts.yaml
T
2026-11-11 13:53:51 +03:00

45 lines
1.3 KiB
YAML

groups:
- name: incidents
rules:
- alert: APIHighErrorRate
expr: slo:api_error_ratio:30s > 0.05
for: 10s
labels:
severity: warning
annotations:
summary: API 5xx > 5% / 30s
runbook: 'REPORT.md: DB incident'
- alert: QueueLagGrowing
expr: max(queue_oldest_age_seconds) > 15 and max(queue_depth) > 0
for: 10s
labels:
severity: warning
annotations:
summary: Durable unfinished job age > 15s
runbook: 'REPORT.md: worker incident'
- alert: APIErrorBudgetBurnFast
expr: slo:api_error_ratio:30s > 0.144 and slo:api_error_ratio:2m > 0.144
for: 10s
labels:
severity: critical
annotations:
summary: 'API 99% SLO: burn >14.4 over 30s AND 2m'
runbook: 'REPORT.md: DB incident'
- alert: APIErrorBudgetBurnSlow
expr: slo:api_error_ratio:1m > 0.06 and slo:api_error_ratio:5m > 0.06
for: 20s
labels:
severity: warning
annotations:
summary: 'API 99% SLO: burn >6 over 1m AND 5m'
runbook: 'REPORT.md: DB incident'
- alert: ReadyErrorBudgetBurn
expr: slo:ready_bad_ratio:30s > 0.144 and slo:ready_bad_ratio:2m > 0.144 and sum(rate(ready_deadline_jobs_total[30s]))
> 0
for: 10s
labels:
severity: warning
annotations:
summary: 'Ready <=10s / 99%: burn >14.4'
runbook: 'REPORT.md: worker incident'