Files
mtusi2026lab7-fork/infra/prometheus/prometheus.yml

32 lines
1.4 KiB
YAML
Raw Permalink 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 v2.55.1 — хранилище МЕТРИК (TSDB на volume promdata, retention 7d)
# и вычислитель alert rules (состояние firing/resolved видно в /alerts и Grafana;
# доставка наружу не настроена — Alertmanager не нужен по заданию).
global:
scrape_interval: 10s
evaluation_interval: 10s
rule_files:
- /etc/prometheus/rules/*.yml
# lab7: scrape Collector только через otel-gate по mTLS (identity prometheus разрешена
# gate только на портах метрик). Проверка сервера: CA стенда + SAN otel-collector.
scrape_configs:
# Метрики приложения, которые Collector получил по OTLP (job/instance от exporter'а).
- job_name: otel-collector-app
honor_labels: true
scheme: https
tls_config: &collector_tls
ca_file: /run/secrets/ca_crt
cert_file: /run/secrets/prometheus_crt
key_file: /run/secrets/prometheus_key
server_name: otel-collector
min_version: TLS12
static_configs:
- targets: ["otel-collector:8889"]
# Собственные метрики Collector: принятые/отброшенные/неотправленные spans, logs, points.
- job_name: otel-collector-self
scheme: https
tls_config: *collector_tls
static_configs:
- targets: ["otel-collector:8888"]