lab 7 done

This commit is contained in:
Khakimov Dmitrij
2026-11-29 21:59:16 +03:00
parent 20afc2c790
commit 2a7418fc45
170 changed files with 10332 additions and 96 deletions
+19
View File
@@ -0,0 +1,19 @@
groups:
- name: messenger-slo
rules:
- alert: APIHighErrorRate
expr: sum(rate(messenger_http_requests_total{status_class="5xx"}[1m])) / clamp_min(sum(rate(messenger_http_requests_total[1m])), 0.01) > 0.05
for: 5s
labels: {severity: warning}
annotations:
summary: More than 5 percent API server failures over 1 minute
runbook_url: http://localhost:13000/d/messenger/messenger-observability
description: Excludes health and client 4xx. Inspect PostgreSQL spans and pool; see RUNBOOK.md.
- alert: QueueLagGrowing
expr: max(messenger_queue_oldest_age_seconds) > 10 and max(messenger_queue_depth) > 0
for: 5s
labels: {severity: warning}
annotations:
summary: Oldest unfinished attachment exceeds 10 seconds
runbook_url: http://localhost:13000/d/messenger/messenger-observability
description: Inspect worker capacity, busy, outcomes and dependency spans; see RUNBOOK.md.
+26
View File
@@ -0,0 +1,26 @@
global:
scrape_interval: 5s
evaluation_interval: 5s
rule_files: [/etc/prometheus/alerts.yaml]
scrape_configs:
- job_name: messenger
scheme: https
tls_config: &client
ca_file: /trust/ca.crt
cert_file: /identity/tls.crt
key_file: /identity/tls.key
static_configs: [{targets: ['collector:48889']}]
- job_name: collector
scheme: https
tls_config: *client
static_configs: [{targets: ['collector:48888']}]
- job_name: tempo
scheme: https
tls_config: *client
static_configs: [{targets: ['tempo:43201']}]
- job_name: loki
scheme: https
tls_config: *client
static_configs: [{targets: ['loki:43102']}]
- job_name: prometheus
static_configs: [{targets: ['localhost:9090']}]