lab7: PKI, mTLS infra, OpenBao non-dev, hardening, lifecycle scripts

This commit is contained in:
2026-11-26 16:47:23 +03:00
parent cda6e27fb8
commit 16accda962
45 changed files with 3593 additions and 660 deletions
+46 -2
View File
@@ -6,7 +6,7 @@ global:
rule_files:
- /etc/prometheus/rules/*.yml
# Метрики API/worker приходят только по OTLP (--web.enable-otlp-receiver);
# Метрики API/worker приходят только по OTLP (--web.enable-otlp-receiver) по mTLS + Basic Auth.
# /internal/metrics — legacy JSON, не exposition-формат, и не скрейпится.
otlp:
translation_strategy: UnderscoreEscapingWithSuffixes
@@ -20,15 +20,59 @@ storage:
scrape_configs:
- job_name: prometheus
scheme: https
tls_config:
ca_file: /run/certs/ca.crt
cert_file: /run/certs/client.crt
key_file: /run/certs/client.key
server_name: localhost
basic_auth:
username: prometheus-self
password_file: /run/secrets/prometheus_self_password
static_configs: [{ targets: ['localhost:9090'] }]
- job_name: otel-collector
scheme: https
tls_config:
ca_file: /run/certs/ca.crt
cert_file: /run/certs/client.crt
key_file: /run/certs/client.key
server_name: otel-collector
static_configs: [{ targets: ['otel-collector:8888'] }]
- job_name: haproxy
scheme: https
metrics_path: /metrics
tls_config:
ca_file: /run/certs/ca.crt
cert_file: /run/certs/client.crt
key_file: /run/certs/client.key
server_name: haproxy
static_configs: [{ targets: ['haproxy:8404'] }]
- job_name: rabbitmq
static_configs: [{ targets: ['broker:15692'] }]
scheme: https
tls_config:
ca_file: /run/certs/ca.crt
cert_file: /run/certs/client.crt
key_file: /run/certs/client.key
server_name: broker
static_configs: [{ targets: ['broker:15691'] }]
- job_name: loki
scheme: https
tls_config:
ca_file: /run/certs/ca.crt
cert_file: /run/certs/client.crt
key_file: /run/certs/client.key
server_name: loki
static_configs: [{ targets: ['loki:3100'] }]
- job_name: tempo
scheme: https
tls_config:
ca_file: /run/certs/ca.crt
cert_file: /run/certs/client.crt
key_file: /run/certs/client.key
server_name: tempo
static_configs: [{ targets: ['tempo:3200'] }]