forked from mtusi2026/mtusi2026lab7
lab7: безопасность, mTLS, OpenBao и PKI lifecycle
This commit is contained in:
+21
-10
@@ -1,13 +1,24 @@
|
||||
# OTel Collector
|
||||
|
||||
`collector.yaml` — единственный OTLP-приёмник стенда. API/worker/relay шлют
|
||||
traces/metrics/logs по HTTP `:4318`; Collector экспортирует:
|
||||
- метрики — pull-exporter Prometheus `:8889` (Prometheus scrape);
|
||||
- логи — OTLP HTTP в Loki `/otlp`;
|
||||
- трассы — OTLP gRPC в Tempo `:4317`.
|
||||
`collector.yaml` сохраняет traces/metrics/logs pipelines. API/worker/relay шлют
|
||||
OTLP HTTP через mTLS gateway `otel-collector:4318`: только authenticated CN
|
||||
`api`, `worker`, `relay` и POST `/v1/traces`, `/v1/metrics`, `/v1/logs`.
|
||||
Native receiver — `127.0.0.1:14318`; отдельного gRPC receiver нет.
|
||||
|
||||
`memory_limiter` ограничивает 140 MiB, batch — 5 с/1024, очереди Loki/Tempo
|
||||
ограничены 10 MiB (`sizer: bytes`) и retry не дольше 30 с. Self-metrics
|
||||
Collector отдаются на `:8888` отдельным scrape-job. OTLP-порты не публикуются
|
||||
на host; Collector подключён к `default` и `observability`, backend'ы — только
|
||||
к `observability`. TLS/auth относятся к lab7.
|
||||
Collector экспортирует:
|
||||
- метрики — loopback pull-exporter `18889`, через mTLS gateway `:8889`;
|
||||
- логи — HTTPS/mTLS в `https://loki:3100/otlp` (итоговый `/otlp/v1/logs`);
|
||||
- трассы — GRPCS/mTLS в `tempo:4437`, где допускается только CN `collector`.
|
||||
|
||||
Exporters используют own identity `current/{ca.crt,tls.crt,tls.key}` в readonly
|
||||
`/run/identity`. Проверка CA/hostname не отключается. Native self-metrics —
|
||||
`127.0.0.1:18888`, health — `127.0.0.1:13133`; mTLS gateways — `:8888`
|
||||
(GET `/metrics`) и `:13134` (GET `/`), только CN `prometheus`/`operator`.
|
||||
Native plaintext endpoints не публикуются и недоступны соседним namespaces.
|
||||
|
||||
`memory_limiter` — 140 MiB, batch — 5 с/1024. Loki/Tempo очереди ограничены
|
||||
10 MiB (`sizer: bytes`), retry не дольше 30 с; отказ телеметрии не должен
|
||||
блокировать business readiness. Gateway ACL/TLS config находятся в
|
||||
`../telemetry-gateway/collector.cfg`; namespace mounts/restarts и lifecycle
|
||||
trust consumers выполняет operator orchestration. Конфигурация не заменяет
|
||||
live проверки доставки трёх signals, wrong-CN rejection и revocation.
|
||||
|
||||
+16
-10
@@ -1,10 +1,8 @@
|
||||
receivers:
|
||||
otlp:
|
||||
protocols:
|
||||
grpc:
|
||||
endpoint: 0.0.0.0:4317
|
||||
http:
|
||||
endpoint: 0.0.0.0:4318
|
||||
endpoint: 127.0.0.1:14318
|
||||
|
||||
processors:
|
||||
memory_limiter:
|
||||
@@ -20,7 +18,7 @@ processors:
|
||||
exporters:
|
||||
# Pull-based: no sending_queue/retry for this exporter.
|
||||
prometheus:
|
||||
endpoint: 0.0.0.0:8889
|
||||
endpoint: 127.0.0.1:18889
|
||||
translation_strategy: UnderscoreEscapingWithSuffixes
|
||||
resource_constant_labels:
|
||||
included:
|
||||
@@ -29,7 +27,12 @@ exporters:
|
||||
- deployment.environment.name
|
||||
- service.version
|
||||
otlp_http/loki:
|
||||
endpoint: http://loki:3100/otlp
|
||||
endpoint: https://loki:3100/otlp
|
||||
tls:
|
||||
ca_file: /run/identity/current/ca.crt
|
||||
cert_file: /run/identity/current/tls.crt
|
||||
key_file: /run/identity/current/tls.key
|
||||
min_version: "1.2"
|
||||
sending_queue:
|
||||
enabled: true
|
||||
sizer: bytes
|
||||
@@ -42,9 +45,12 @@ exporters:
|
||||
max_elapsed_time: 30s
|
||||
timeout: 5s
|
||||
otlp_grpc/tempo:
|
||||
endpoint: tempo:4317
|
||||
endpoint: tempo:4437
|
||||
tls:
|
||||
insecure: true
|
||||
ca_file: /run/identity/current/ca.crt
|
||||
cert_file: /run/identity/current/tls.crt
|
||||
key_file: /run/identity/current/tls.key
|
||||
min_version: "1.2"
|
||||
sending_queue:
|
||||
enabled: true
|
||||
sizer: bytes
|
||||
@@ -59,7 +65,7 @@ exporters:
|
||||
|
||||
extensions:
|
||||
health_check:
|
||||
endpoint: 0.0.0.0:13133
|
||||
endpoint: 127.0.0.1:13133
|
||||
|
||||
service:
|
||||
extensions: [health_check]
|
||||
@@ -69,8 +75,8 @@ service:
|
||||
- pull:
|
||||
exporter:
|
||||
prometheus:
|
||||
host: 0.0.0.0
|
||||
port: 8888
|
||||
host: 127.0.0.1
|
||||
port: 18888
|
||||
pipelines:
|
||||
traces:
|
||||
receivers: [otlp]
|
||||
|
||||
Reference in New Issue
Block a user