global: scrape_interval: 5s evaluation_interval: 5s external_labels: environment: lab stack: lab7 rule_files: - /etc/prometheus/rules/*.yml scrape_configs: # Метрики приложения приходят из OTel Collector. Scrape идёт по mTLS через # collector-tls: Prometheus предъявляет prometheus-client, шлюз проверяет SAN. - job_name: otel-collector-app-metrics scheme: https tls_config: ca_file: /certs/ca.crt cert_file: /certs/prometheus-client.crt key_file: /certs/prometheus-client.key server_name: collector-tls static_configs: - targets: ["collector-tls:8889"] # Self-telemetry Collector-а: приём, очередь, потери экспорта. - job_name: otel-collector-self scheme: https tls_config: ca_file: /certs/ca.crt cert_file: /certs/prometheus-client.crt key_file: /certs/prometheus-client.key server_name: collector-tls static_configs: - targets: ["collector-tls:8888"] # Loopback внутри контейнера Prometheus: закрытый локальный hop, не сеть. - job_name: prometheus static_configs: - targets: ["127.0.0.1:9090"]