This commit is contained in:
2026-11-26 23:34:55 +03:00
parent 20afc2c790
commit a25f357314
167 changed files with 33202 additions and 89 deletions
+27
View File
@@ -0,0 +1,27 @@
groups:
- name: messenger-slo
rules:
- alert: ApiHighErrorRate
expr: (sum(rate(http_server_requests_total{http_response_status_class="5xx"}[1m])) or vector(0)) / clamp_min(sum(rate(http_server_requests_total[1m])), 0.001) > 0.05
for: 30s
labels:
severity: warning
annotations:
summary: API 5xx ratio above 5% for 30 seconds (1 minute window)
description: Check server spans, postgresql.pool.acquire and DB pool metrics. Runbook in REPORT.md.
- alert: QueueLagGrowing
expr: max(queue_oldest_age) > 30 and max(queue_depth) > 0 and max(delta(queue_oldest_age[1m])) > 0
for: 30s
labels:
severity: warning
annotations:
summary: Durable backlog is ageing beyond 30 seconds
description: Check worker capacity/busy, worker logs and Redis/DB/S3 spans. Runbook in REPORT.md.
- alert: QueueObservationStale
expr: time() - max(queue_observation_timestamp) > 30 or absent(queue_observation_timestamp)
for: 30s
labels:
severity: warning
annotations:
summary: Queue observer unavailable
description: Queue values may be stale; check PostgreSQL and API observer logs.
+15
View File
@@ -0,0 +1,15 @@
global:
scrape_interval: 5s
rule_files:
- /etc/prometheus/alerts.yaml
scrape_configs:
- job_name: messenger
scheme: https
static_configs:
- targets:
- otel-collector-tls:9464
tls_config:
ca_file: /pki/ca.crt
cert_file: /identity/prometheus.crt
key_file: /identity/prometheus.key
server_name: otel-collector