Files
mtusi2026lab7/infra/prometheus/prometheus.yml
T

40 lines
1.4 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 — хранилище метрик (TSDB в volume prometheus-data) и вычисление правил/alerts.
# Метрики api, worker, RabbitMQ, HAProxy и Collector приходят от Collector по OTLP (--web.enable-otlp-receiver,
# /api/v1/otlp/v1/metrics); сам Prometheus скрейпит только соседей по сети telemetry.
# Имена OTLP → Prometheus: точки → «_», суффикс единицы и _total (http.server.request.duration →
# http_server_request_duration_seconds_bucket); service.name → job, service.instance.id → instance.
global:
scrape_interval: 10s
evaluation_interval: 10s
rule_files:
- /etc/prometheus/rules/*.yml
otlp:
translation_strategy: UnderscoreEscapingWithSuffixes
storage:
tsdb:
# Пакеты OTLP от разных реплик приходят с задержкой Collector (batch 2 с, повтор до 60 с).
out_of_order_time_window: 10m
scrape_configs:
- job_name: prometheus
scheme: https
tls_config: &scrape_tls
ca_file: /run/tls/ca.crt
cert_file: /run/client/tls.crt
key_file: /run/client/tls.key
static_configs:
- targets: [prometheus:9090]
- job_name: loki
scheme: https
tls_config: *scrape_tls
static_configs:
- targets: [loki:3100]
- job_name: tempo
scheme: https
tls_config: *scrape_tls
static_configs:
- targets: [tempo:3200]