Files
mtusi2026lab7/infra/prometheus/alerts.yml
T

20 lines
948 B
YAML

groups:
- name: messenger-sli
rules:
- alert: MessengerHighHttp5xxRatio
expr: sum(rate(messenger_http_server_requests_total{http_response_status_class="5xx",http_route!~"/health.*"}[5m])) / clamp_min(sum(rate(messenger_http_server_requests_total{http_route!~"/health.*"}[5m])), 0.001) > 0.05
for: 2m
labels:
severity: warning
annotations:
summary: API 5xx ratio is above 5% for 2 minutes
description: Inspect API traces for database or object-store spans and follow infra/runbooks/high-errors.md.
- alert: MessengerQueueLagHigh
expr: messenger_queue_oldest_job_age_seconds{queue_name="attachment-jobs"} > 60
for: 2m
labels:
severity: warning
annotations:
summary: Oldest queued attachment job is older than 60 seconds
description: Inspect worker health, queue depth and follow infra/runbooks/queue-lag.md.