Files
mtusi2026lab7/observability/prometheus/prometheus.yml
T
kokorindenis a884c07867
Skeleton contracts / contracts (pull_request) Canceled after 0s
solution
2026-11-27 16:42:18 +03:00

37 lines
1.2 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.
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"]