Добавлен сбор телеметрии на ВМ2

This commit is contained in:
mi
2026-08-26 15:12:51 +03:00
parent 728b9826a3
commit f989097484
32 changed files with 2029 additions and 134 deletions
@@ -16,6 +16,8 @@ x-postgres-ca-volume: &postgres-ca-volume
x-message-safety-environment: &message-safety-environment
APP_ENV: ${APP_ENV:?set APP_ENV}
RELEASE_VERSION: ${RELEASE_VERSION:?set RELEASE_VERSION}
LOG_LEVEL: ${LOG_LEVEL:-INFO}
MESSAGE_SAFETY_HOST: ${MESSAGE_SAFETY_HOST:-0.0.0.0}
MESSAGE_SAFETY_PORT: ${MESSAGE_SAFETY_PORT:-8080}
MESSAGE_SAFETY_WORKER_CONCURRENCY: ${MESSAGE_SAFETY_WORKER_CONCURRENCY:-5}
@@ -36,6 +38,8 @@ x-message-safety-environment: &message-safety-environment
x-bitrix-sync-environment: &bitrix-sync-environment
APP_ENV: ${APP_ENV:?set APP_ENV}
RELEASE_VERSION: ${RELEASE_VERSION:?set RELEASE_VERSION}
LOG_LEVEL: ${LOG_LEVEL:-INFO}
BITRIX_SYNC_ENABLED: ${BITRIX_SYNC_ENABLED:-false}
BITRIX_SYNC_MODE: ${BITRIX_SYNC_MODE:-disabled}
BITRIX_SYNC_PORTAL_HOST: ${BITRIX_SYNC_PORTAL_HOST:?set approved portal}
@@ -91,7 +95,8 @@ services:
nofile:
soft: 4096
hard: 4096
networks: [public, backend]
networks: [public, backend, observability]
expose: ["8081"]
depends_on:
message-safety-api:
condition: service_started
@@ -130,6 +135,40 @@ services:
mem_limit: 640m
cpus: 1.0
redis-exporter:
<<: *hardening
image: ${REDIS_EXPORTER_IMAGE:?set immutable Redis exporter image digest}
environment:
REDIS_ADDR: redis://redis-safety:6379
REDIS_USER: exporter
REDIS_PASSWORD_FILE: /run/secrets/redis_exporter_password
secrets:
- redis_exporter_password
networks: [backend, observability]
expose: ["9121"]
depends_on:
redis-safety:
condition: service_healthy
tmpfs:
- /tmp:rw,noexec,nosuid,nodev,size=16m
pids_limit: 50
mem_limit: 64m
cpus: 0.25
nginx-exporter:
<<: *hardening
image: ${NGINX_EXPORTER_IMAGE:?set immutable nginx exporter image digest}
command:
- --nginx.scrape-uri=http://nginx:8081/stub_status
networks: [observability]
expose: ["9113"]
depends_on:
nginx:
condition: service_healthy
pids_limit: 50
mem_limit: 64m
cpus: 0.25
clamd:
<<: *hardening
image: ${CLAMAV_IMAGE:?set immutable ClamAV image digest}
@@ -203,6 +242,7 @@ services:
volumes:
- ./observability/otel-collector.yaml:/etc/otelcol-contrib/config.yaml:ro
- otel-queue:/var/lib/otelcol/queue
- /:/hostfs:ro
networks:
observability: {}
telemetry-egress:
@@ -210,9 +250,9 @@ services:
depends_on:
otel-queue-init:
condition: service_completed_successfully
expose: ["4317", "4318"]
expose: ["4317", "4318", "13133", "8888"]
healthcheck:
test: ["CMD", "/otelcol-contrib", "components"]
test: ["CMD", "/otelcol-contrib", "validate", "--config=/etc/otelcol-contrib/config.yaml"]
interval: 30s
timeout: 5s
retries: 3
@@ -465,3 +505,5 @@ secrets:
file: /run/han-chat/secrets/BITRIX_SYNC_SERVICE_TOKEN
redis_safety_acl:
file: /run/han-chat/secrets/REDIS_SAFETY_ACL
redis_exporter_password:
file: /run/han-chat/secrets/REDIS_EXPORTER_PASSWORD