lab6: observability, otel, grafana, incidents and dashboard

This commit is contained in:
2026-11-17 15:57:31 +03:00
parent 470d9d6f1e
commit 0f7b4461cb
44 changed files with 2792 additions and 44 deletions
+23
View File
@@ -0,0 +1,23 @@
groups:
- name: lab6-signals
interval: 5s
rules:
- alert: MessengerHighErrorRate
expr: |
(sum(rate(messenger_http_requests_total{route!="/health",status_class="5xx"}[1m]))
/ clamp_min(sum(rate(messenger_http_requests_total{route!="/health"}[1m])), 0.000001)) > 0.10
and sum(rate(messenger_http_requests_total{route!="/health"}[1m])) > 0.05
for: 15s
labels:
severity: warning
annotations:
summary: '5xx responses exceed 10% of business requests'
runbook: 'Check API error rate, Loki errors, Tempo DB spans and postgres health'
- alert: MessengerQueueLagGrowing
expr: max(messenger_queue_oldest_age_seconds) > 20
for: 15s
labels:
severity: warning
annotations:
summary: 'Oldest queued attachment is older than 20 seconds'
runbook: 'Check worker status, RabbitMQ queue and job failure spans in Tempo'
+12
View File
@@ -0,0 +1,12 @@
global:
scrape_interval: 5s
evaluation_interval: 5s
rule_files:
- /etc/prometheus/alerts.yml
scrape_configs:
- job_name: collector
static_configs:
- targets: ['otel-collector:8889']
- job_name: prometheus
static_configs:
- targets: ['localhost:9090']