forked from mtusi2026/mtusi2026lab6
Implement observable messenger, SLO alerts and measured incident scenarios
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
groups:
|
||||
- name: messenger-slo
|
||||
interval: 5s
|
||||
rules:
|
||||
- alert: APIAvailabilityBurn
|
||||
expr: |
|
||||
(sum(rate(http_server_requests_total{status_class="5xx"}[20s])) / clamp_min(sum(rate(http_server_requests_total[20s])), 0.001) / 0.005 > 10)
|
||||
and
|
||||
(sum(rate(http_server_requests_total{status_class="5xx"}[60s])) / clamp_min(sum(rate(http_server_requests_total[60s])), 0.001) / 0.005 > 10)
|
||||
for: 30s
|
||||
labels: {severity: critical}
|
||||
annotations:
|
||||
summary: "API 99.5% availability budget burns >10x in both 20s and 60s windows"
|
||||
runbook: "RUNBOOK.md#api"
|
||||
- alert: AttachmentReadyBurn
|
||||
expr: |
|
||||
(sum(attachment_slo_bad{window="60"}) / clamp_min(sum(attachment_slo_eligible{window="60"}),1) / 0.01 > 10)
|
||||
and
|
||||
(sum(attachment_slo_bad{window="300"}) / clamp_min(sum(attachment_slo_eligible{window="300"}),1) / 0.01 > 10)
|
||||
for: 15s
|
||||
labels: {severity: critical}
|
||||
annotations:
|
||||
summary: "99% ready within 30s budget burns >10x in both 60s and 300s eligible cohorts"
|
||||
runbook: "RUNBOOK.md#queue"
|
||||
- alert: QueueLag
|
||||
expr: max(queue_oldest_age_seconds) > 30 and sum(queue_depth) > 0
|
||||
for: 10s
|
||||
labels: {severity: warning}
|
||||
annotations:
|
||||
summary: "An unfinished durable job has waited over 30s"
|
||||
runbook: "RUNBOOK.md#queue"
|
||||
Reference in New Issue
Block a user