forked from mtusi2026/mtusi2026lab6
24 lines
984 B
YAML
24 lines
984 B
YAML
groups:
|
|
- name: messenger-slo
|
|
rules:
|
|
- alert: ApiHighErrorRate
|
|
expr: |
|
|
sum(rate(http_server_requests_total{http_response_status_class="5xx"}[1m]))
|
|
/ sum(rate(http_server_requests_total[1m])) > 0.05
|
|
for: 20s
|
|
labels:
|
|
severity: page
|
|
annotations:
|
|
summary: "API 5xx ratio above 5% over 1m"
|
|
description: "SLI: share of non-5xx business requests; SLO 99% over 30d. Fast-burn check on a 1m window."
|
|
runbook: "infra/runbook.md#apihigherrorrate"
|
|
- alert: QueueLagGrowing
|
|
expr: max(queue_oldest_job_age_seconds{queue="attachments.jobs"}) > 20
|
|
for: 20s
|
|
labels:
|
|
severity: page
|
|
annotations:
|
|
summary: "Oldest queued job older than 20s"
|
|
description: "SLO: 95% of attachments reach ready within 10s over 30d. A job waiting more than 20s means the worker does not keep up."
|
|
runbook: "infra/runbook.md#queuelaggrowing"
|