Files
mtusi2026lab6/infra/otel/prometheus/prometheus.yml
T
ricoromaandClaude Opus 5.5 15ea156404 feat: add SLOs, Prometheus alert rules and telemetry loss accounting
HAProxy /metrics scraped by the Collector, recording rules and seven alerts with promtool tests and runbooks (make alerts_test, CI step), byte-sized Collector export queues with 30 s retries, SDK internal metrics, SLO/LB/pipeline dashboard rows, driver commands alerts-check and backend-outage (change slo-alerts).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 00:35:01 +03:00

53 lines
2.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Prometheus v3.15.1 — хранилище метрик (design change otel-telemetry,
# решения 3 и 15). Метрики приложения — scrape экспортёра prometheus
# Collector (honor_labels: job = service.name, instance = service.instance.id
# из OTLP; там же метрики LB с job = haproxy), плюс собственные метрики
# Collector, Loki, Tempo и самого Prometheus: по ним видно, жив ли конвейер.
# Срок и предел объёма хранения, путь данных и время начала рядов — флаги
# команды в docker-compose.yml. Приёмников remote write и OTLP, admin API и
# lifecycle нет; порт не публикуется. Правила записи и оповещения — rules.yml
# (design change slo-alerts, решения 1, 3, 4, 9); блока alerting нет:
# доставки наружу нет, состояние firing / resolved — API правил, ряды ALERTS и
# Grafana.
global:
scrape_interval: 15s
scrape_timeout: 10s
evaluation_interval: 15s
# явно прежний текстовый список Prometheus 3 по умолчанию: флаг
# created-timestamp-zero-ingestion иначе переводит на protobuf все цели, а
# время начала нужно только экспортёру Collector (решение 6)
scrape_protocols:
- OpenMetricsText1.0.0
- OpenMetricsText0.0.1
- PrometheusText1.0.0
- PrometheusText0.0.4
rule_files:
- /etc/prometheus/rules.yml
scrape_configs:
# метрики API, worker и relay, пришедшие в Collector по OTLP, и метрики LB
# с приёмника prometheus/haproxy. Protobuf первым: время начала
# cumulative-ряда экспортёр Collector отдаёт только в нём, и Prometheus
# пишет ноль в момент старта нового процесса (решение 6)
- job_name: otel-collector-exporter
honor_labels: true
scrape_protocols:
- PrometheusProto
- OpenMetricsText1.0.0
- PrometheusText0.0.4
static_configs:
- targets: ["otel-collector:8889"]
- job_name: otel-collector
static_configs:
- targets: ["otel-collector:8888"]
- job_name: loki
static_configs:
- targets: ["loki:3100"]
- job_name: tempo
static_configs:
- targets: ["tempo:3200"]
- job_name: prometheus
static_configs:
- targets: ["127.0.0.1:9090"]