clickhouse-fix

This commit is contained in:
Robbie 2026-06-16 13:44:21 -04:00
parent a9223fa381
commit c3a20a1107
3 changed files with 46 additions and 7 deletions

View file

@ -2,7 +2,7 @@
<clickhouse> <clickhouse>
<zookeeper> <zookeeper>
<node index="1"> <node index="1">
<host>zookeeper</host> <host>zookeeper-1</host>
<port>2181</port> <port>2181</port>
</node> </node>
</zookeeper> </zookeeper>

View file

@ -17,6 +17,7 @@
<max_connections>4096</max_connections> <max_connections>4096</max_connections>
<keep_alive_timeout>3</keep_alive_timeout> <keep_alive_timeout>3</keep_alive_timeout>
<max_concurrent_queries>100</max_concurrent_queries> <max_concurrent_queries>100</max_concurrent_queries>
<allow_experimental_parameterized_queries>1</allow_experimental_parameterized_queries>
<max_server_memory_usage>0</max_server_memory_usage> <max_server_memory_usage>0</max_server_memory_usage>
<max_thread_pool_size>10000</max_thread_pool_size> <max_thread_pool_size>10000</max_thread_pool_size>
<max_server_memory_usage_to_ram_ratio>0.9</max_server_memory_usage_to_ram_ratio> <max_server_memory_usage_to_ram_ratio>0.9</max_server_memory_usage_to_ram_ratio>

View file

@ -4,18 +4,27 @@ services:
# =========================================================================== # ===========================================================================
# ZooKeeper — required for ClickHouse coordination # ZooKeeper — required for ClickHouse coordination
# =========================================================================== # ===========================================================================
zookeeper: zookeeper-1:
image: signoz/zookeeper:${ZOOKEEPER_VERSION:-3.7.1} image: signoz/zookeeper:${ZOOKEEPER_VERSION:-3.7.1}
container_name: signoz-zookeeper-1
restart: unless-stopped restart: unless-stopped
user: root user: root
labels:
signoz.io/scrape: "true"
signoz.io/port: "9141"
signoz.io/path: "/metrics"
environment: environment:
ZOO_SERVER_ID: 1 ZOO_SERVER_ID: "1"
ALLOW_ANONYMOUS_LOGIN: "yes" ALLOW_ANONYMOUS_LOGIN: "yes"
ZOO_AUTOPURGE_INTERVAL: 1 ZOO_AUTOPURGE_INTERVAL: "1"
ZOO_ENABLE_PROMETHEUS_METRICS: "yes" ZOO_ENABLE_PROMETHEUS_METRICS: "yes"
ZOO_PROMETHEUS_METRICS_PORT_NUMBER: 9141 ZOO_PROMETHEUS_METRICS_PORT_NUMBER: "9141"
volumes: volumes:
- ./zookeeper-data:/bitnami/zookeeper - ./zookeeper-data:/bitnami/zookeeper
logging:
options:
max-size: 50m
max-file: "3"
healthcheck: healthcheck:
test: test:
- CMD-SHELL - CMD-SHELL
@ -31,6 +40,7 @@ services:
# =========================================================================== # ===========================================================================
init-clickhouse: init-clickhouse:
image: clickhouse/clickhouse-server:${CLICKHOUSE_VERSION:-25.5} image: clickhouse/clickhouse-server:${CLICKHOUSE_VERSION:-25.5}
container_name: signoz-init-clickhouse
restart: on-failure restart: on-failure
command: command:
- bash - bash
@ -48,6 +58,10 @@ services:
echo "Done (non-critical if download failed — migrator will handle it)." echo "Done (non-critical if download failed — migrator will handle it)."
volumes: volumes:
- ./clickhouse/user_scripts:/var/lib/clickhouse/user_scripts - ./clickhouse/user_scripts:/var/lib/clickhouse/user_scripts
logging:
options:
max-size: 50m
max-file: "3"
networks: networks:
- signoz - signoz
@ -56,12 +70,17 @@ services:
# =========================================================================== # ===========================================================================
clickhouse: clickhouse:
image: clickhouse/clickhouse-server:${CLICKHOUSE_VERSION:-25.5} image: clickhouse/clickhouse-server:${CLICKHOUSE_VERSION:-25.5}
container_name: signoz-clickhouse
restart: unless-stopped restart: unless-stopped
tty: true tty: true
labels:
signoz.io/scrape: "true"
signoz.io/port: "9363"
signoz.io/path: "/metrics"
depends_on: depends_on:
init-clickhouse: init-clickhouse:
condition: service_completed_successfully condition: service_completed_successfully
zookeeper: zookeeper-1:
condition: service_healthy condition: service_healthy
environment: environment:
CLICKHOUSE_SKIP_USER_SETUP: "1" CLICKHOUSE_SKIP_USER_SETUP: "1"
@ -72,6 +91,10 @@ services:
- ./clickhouse/user_scripts:/var/lib/clickhouse/user_scripts:ro - ./clickhouse/user_scripts:/var/lib/clickhouse/user_scripts:ro
- ./clickhouse/config.d/cluster.xml:/etc/clickhouse-server/config.d/cluster.xml:ro - ./clickhouse/config.d/cluster.xml:/etc/clickhouse-server/config.d/cluster.xml:ro
- ./clickhouse-data:/var/lib/clickhouse - ./clickhouse-data:/var/lib/clickhouse
logging:
options:
max-size: 50m
max-file: "3"
healthcheck: healthcheck:
test: test:
- CMD - CMD
@ -95,6 +118,7 @@ services:
# =========================================================================== # ===========================================================================
signoz: signoz:
image: signoz/signoz:${SIGNOZ_VERSION:-v0.128.0} image: signoz/signoz:${SIGNOZ_VERSION:-v0.128.0}
container_name: signoz
restart: unless-stopped restart: unless-stopped
depends_on: depends_on:
clickhouse: clickhouse:
@ -109,6 +133,10 @@ services:
- ${EXPOSE_SIGNOZ_UI_PORT:-8080}:8080 - ${EXPOSE_SIGNOZ_UI_PORT:-8080}:8080
volumes: volumes:
- ./signoz-data:/var/lib/signoz - ./signoz-data:/var/lib/signoz
logging:
options:
max-size: 50m
max-file: "3"
healthcheck: healthcheck:
test: test:
- CMD - CMD
@ -136,6 +164,7 @@ services:
# =========================================================================== # ===========================================================================
otel-collector: otel-collector:
image: signoz/signoz-otel-collector:${OTELCOL_VERSION:-v0.144.5} image: signoz/signoz-otel-collector:${OTELCOL_VERSION:-v0.144.5}
container_name: signoz-otel-collector
restart: unless-stopped restart: unless-stopped
depends_on: depends_on:
clickhouse: clickhouse:
@ -162,6 +191,10 @@ services:
- ${EXPOSE_OTLP_GRPC_PORT:-4317}:4317 - ${EXPOSE_OTLP_GRPC_PORT:-4317}:4317
# OTLP HTTP receiver # OTLP HTTP receiver
- ${EXPOSE_OTLP_HTTP_PORT:-4318}:4318 - ${EXPOSE_OTLP_HTTP_PORT:-4318}:4318
logging:
options:
max-size: 50m
max-file: "3"
networks: networks:
- signoz - signoz
- pipeline - pipeline
@ -169,8 +202,9 @@ services:
# =========================================================================== # ===========================================================================
# Telemetry Store Migrator — runs ClickHouse migrations # Telemetry Store Migrator — runs ClickHouse migrations
# =========================================================================== # ===========================================================================
migrator: signoz-telemetrystore-migrator:
image: signoz/signoz-otel-collector:${OTELCOL_VERSION:-v0.144.5} image: signoz/signoz-otel-collector:${OTELCOL_VERSION:-v0.144.5}
container_name: signoz-telemetrystore-migrator
restart: on-failure restart: on-failure
depends_on: depends_on:
clickhouse: clickhouse:
@ -189,6 +223,10 @@ services:
/signoz-otel-collector migrate bootstrap && /signoz-otel-collector migrate bootstrap &&
/signoz-otel-collector migrate sync up && /signoz-otel-collector migrate sync up &&
/signoz-otel-collector migrate async up /signoz-otel-collector migrate async up
logging:
options:
max-size: 50m
max-file: "3"
networks: networks:
- signoz - signoz