forked from mtusi2026/mtusi2026lab6
20 lines
1007 B
YAML
20 lines
1007 B
YAML
groups:
|
|
- name: messenger-slo
|
|
rules:
|
|
- alert: APIHighErrorRate
|
|
expr: sum(rate(messenger_http_requests_total{status_class="5xx"}[1m])) / clamp_min(sum(rate(messenger_http_requests_total[1m])), 0.01) > 0.05
|
|
for: 5s
|
|
labels: {severity: warning}
|
|
annotations:
|
|
summary: More than 5 percent API server failures over 1 minute
|
|
runbook_url: http://localhost:13000/d/messenger/messenger-observability
|
|
description: Excludes health and client 4xx. Inspect PostgreSQL spans and pool; see RUNBOOK.md.
|
|
- alert: QueueLagGrowing
|
|
expr: max(messenger_queue_oldest_age_seconds) > 10 and max(messenger_queue_depth) > 0
|
|
for: 5s
|
|
labels: {severity: warning}
|
|
annotations:
|
|
summary: Oldest unfinished attachment exceeds 10 seconds
|
|
runbook_url: http://localhost:13000/d/messenger/messenger-observability
|
|
description: Inspect worker capacity, busy, outcomes and dependency spans; see RUNBOOK.md.
|