forked from mtusi2026/mtusi2026lab6
28 lines
1.2 KiB
YAML
28 lines
1.2 KiB
YAML
groups:
|
|
- name: messenger-slo
|
|
rules:
|
|
- alert: ApiHighErrorRate
|
|
expr: (sum(rate(http_server_requests_total{http_response_status_class="5xx"}[1m])) or vector(0)) / clamp_min(sum(rate(http_server_requests_total[1m])), 0.001) > 0.05
|
|
for: 30s
|
|
labels:
|
|
severity: warning
|
|
annotations:
|
|
summary: API 5xx ratio above 5% for 30 seconds (1 minute window)
|
|
description: Check server spans, postgresql.pool.acquire and DB pool metrics. Runbook in REPORT.md.
|
|
- alert: QueueLagGrowing
|
|
expr: max(queue_oldest_age) > 30 and max(queue_depth) > 0 and max(delta(queue_oldest_age[1m])) > 0
|
|
for: 30s
|
|
labels:
|
|
severity: warning
|
|
annotations:
|
|
summary: Durable backlog is ageing beyond 30 seconds
|
|
description: Check worker capacity/busy, worker logs and Redis/DB/S3 spans. Runbook in REPORT.md.
|
|
- alert: QueueObservationStale
|
|
expr: time() - max(queue_observation_timestamp) > 30 or absent(queue_observation_timestamp)
|
|
for: 30s
|
|
labels:
|
|
severity: warning
|
|
annotations:
|
|
summary: Queue observer unavailable
|
|
description: Queue values may be stale; check PostgreSQL and API observer logs.
|