Files
mtusi2026lab7/infra/otel/alerts.yaml
T
gytall 0b97f77d76
Skeleton contracts / contracts (pull_request) Canceled after 0s
skeleton lab7 and tasks for grade 3
2026-11-21 16:21:47 +03:00

19 lines
947 B
YAML

groups:
- name: messenger
interval: 5s
rules:
- alert: MessengerHighErrorRate
expr: |
sum(increase(messenger_http_requests_total{http_response_status_class="5xx",http_route!~"/health/.*"}[30s]))
/ clamp_min(sum(increase(messenger_http_requests_total{http_route!~"/health/.*"}[30s])), 1) > 0.05
for: 5s
annotations:
summary: "Более 5% бизнес-запросов завершились HTTP 5xx за 30 секунд"
runbook: "REPORT.md#диагностика-инцидентов"
- alert: MessengerQueueLag
expr: max(messenger_queue_oldest_seconds) > 15 and max(messenger_queue_depth_ratio) > 0
for: 5s
annotations:
summary: "Старейшее ожидающее задание находится в очереди более 15 секунд"
runbook: "REPORT.md#диагностика-инцидентов"