add level 3 and 4

This commit is contained in:
Матвей
2026-11-05 22:23:52 +03:00
parent 66026d3ec9
commit 45c7aa0085
30 changed files with 1370 additions and 68 deletions
+13
View File
@@ -0,0 +1,13 @@
groups:
- name: messenger
rules:
- alert: MessengerHighErrorRate
expr: (sum(rate(messenger_http_requests_total{status_class="5xx",route!~"/health/.*"}[1m])) or vector(0)) / clamp_min(sum(rate(messenger_http_requests_total{route!~"/health/.*"}[1m])), 0.001) > 0.05
for: 10s
labels: {severity: warning}
annotations: {summary: 'API 5xx ratio exceeds 5%', runbook: 'Inspect API latency, traces and dependency spans; check DB readiness.'}
- alert: MessengerQueueLag
expr: max(messenger_queue_age_seconds{service_name="messenger-outbox"}) > 30
for: 15s
labels: {severity: warning}
annotations: {summary: 'Oldest queued job exceeds 30 seconds', runbook: 'Check worker health, busy/capacity, broker and consumer traces.'}
+7
View File
@@ -0,0 +1,7 @@
global: {scrape_interval: 5s, evaluation_interval: 5s}
rule_files: ['/etc/prometheus/alerts.yaml']
scrape_configs:
- job_name: collector
static_configs: [{targets: ['otel-collector:8889']}]
- job_name: collector-internal
static_configs: [{targets: ['otel-collector:8888']}]