From a1725161359c2456b7c5ba9627f3c406da52ca7d Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Tue, 10 Jun 2025 08:11:45 -0400 Subject: [PATCH 1/6] Adding Signoz services. --- docker-compose.yml | 189 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 929bdb20..b42b5c00 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -51,6 +51,65 @@ x-maxun: &maxun-env CHROMIUM_FLAGS: '--disable-gpu --no-sandbox --headless=new' #DEBUG: pw:api #PWDEBUG: 1 +x-signoz-common: &signoz-common + # networks: + # - signoz-net + restart: unless-stopped + logging: + options: + max-size: 50m + max-file: "3" +x-signoz-clickhouse-defaults: &signoz-clickhouse-defaults + !!merge <<: *signoz-common + # addding non LTS version due to this fix https://github.com/ClickHouse/ClickHouse/commit/32caf8716352f45c1b617274c7508c86b7d1afab + image: clickhouse/clickhouse-server:24.1.2-alpine + tty: true + labels: + signoz.io/scrape: "true" + signoz.io/port: "9363" + signoz.io/path: "/metrics" + depends_on: + signoz-init-clickhouse: + condition: service_completed_successfully + signoz-zookeeper-1: + condition: service_healthy + healthcheck: + test: + - CMD + - wget + - --spider + - -q + - 0.0.0.0:8123/ping + interval: 30s + timeout: 5s + retries: 3 + ulimits: + nproc: 65535 + nofile: + soft: 262144 + hard: 262144 +x-signoz-zookeeper-defaults: &signoz-zookeeper-defaults + !!merge <<: *signoz-common + image: bitnami/zookeeper:3.7.1 + user: root + labels: + signoz.io/scrape: "true" + signoz.io/port: "9141" + signoz.io/path: "/metrics" + healthcheck: + test: + - CMD-SHELL + - curl -s -m 2 http://localhost:8080/commands/ruok | grep error | grep null + interval: 30s + timeout: 5s + retries: 3 +x-signoz-db-depend: &signoz-db-depend + !!merge <<: *signoz-common + depends_on: + signoz-clickhouse: + condition: service_healthy + signoz-schema-migrator-sync: + condition: service_completed_successfully services: actual_server: container_name: actualbudget @@ -4436,6 +4495,130 @@ services: - semaphore_config:/etc/semaphore - semaphore_data:/var/lib/semaphore - semaphore_tmp:/tmp/semaphore + signoz-init-clickhouse: + !!merge <<: *signoz-common + container_name: signoz-init-clickhouse + command: + - bash + - -c + - | + version="v0.0.1" + node_os=$$(uname -s | tr '[:upper:]' '[:lower:]') + node_arch=$$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) + echo "Fetching histogram-binary for $${node_os}/$${node_arch}" + cd /tmp + wget -O histogram-quantile.tar.gz "https://github.com/SigNoz/signoz/releases/download/histogram-quantile%2F$${version}/histogram-quantile_$${node_os}_$${node_arch}.tar.gz" + tar -xvzf histogram-quantile.tar.gz + mv histogram-quantile /var/lib/clickhouse/user_scripts/histogramQuantile + image: clickhouse/clickhouse-server:24.1.2-alpine + restart: on-failure + volumes: + - ${DOCKER_VOLUME_CONFIG}/signoz/common/clickhouse/user_scripts:/var/lib/clickhouse/user_scripts/ + signoz-zookeeper-1: + !!merge <<: *signoz-zookeeper-defaults + container_name: signoz-zookeeper-1 + environment: + ZOO_SERVER_ID: 1 + ALLOW_ANONYMOUS_LOGIN: yes + ZOO_AUTOPURGE_INTERVAL: 1 + ZOO_ENABLE_PROMETHEUS_METRICS: yes + ZOO_PROMETHEUS_METRICS_PORT_NUMBER: 9141 + # ports: + # - "2181:2181" + # - "2888:2888" + # - "3888:3888" + volumes: + - signoz-zookeeper-1:/bitnami/zookeeper + signoz-clickhouse: + !!merge <<: *signoz-clickhouse-defaults + container_name: signoz-clickhouse + # ports: + # - "9000:9000" + # - "8123:8123" + # - "9181:9181" + volumes: + - ${DOCKER_VOLUME_CONFIG}/signoz/common/clickhouse/config.xml:/etc/clickhouse-server/config.xml + - ${DOCKER_VOLUME_CONFIG}/signoz/common/clickhouse/users.xml:/etc/clickhouse-server/users.xml + - ${DOCKER_VOLUME_CONFIG}/signoz/common/clickhouse/custom-function.xml:/etc/clickhouse-server/custom-function.xml + - ${DOCKER_VOLUME_CONFIG}/signoz/common/clickhouse/user_scripts:/var/lib/clickhouse/user_scripts/ + - ${DOCKER_VOLUME_CONFIG}/signoz/common/clickhouse/cluster.xml:/etc/clickhouse-server/config.d/cluster.xml + - signoz-clickhouse:/var/lib/clickhouse/ + # - ${DOCKER_VOLUME_CONFIG}/signoz/common/clickhouse/storage.xml:/etc/clickhouse-server/config.d/storage.xml + signoz: + !!merge <<: *signoz-db-depend + container_name: signoz + command: + - --config=/root/config/prometheus.yml + environment: + SIGNOZ_ALERTMANAGER_PROVIDER: signoz + SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://signoz-clickhouse:9000 + SIGNOZ_SQLSTORE_SQLITE_PATH: /var/lib/signoz/signoz.db + DASHBOARDS_PATH: /root/config/dashboards + STORAGE: clickhouse + GODEBUG: netdns=go + TELEMETRY_ENABLED: true + DEPLOYMENT_TYPE: docker-standalone-amd + healthcheck: + test: + - CMD + - wget + - --spider + - -q + - localhost:8080/api/v1/health + interval: 30s + timeout: 5s + retries: 3 + image: signoz/signoz:${VERSION:-v0.86.2} + ports: + - 36113:8080 # signoz port + # - "6060:6060" # pprof port + volumes: + - ${DOCKER_VOLUME_CONFIG}/signoz/common/signoz/prometheus.yml:/root/config/prometheus.yml + - ${DOCKER_VOLUME_CONFIG}/signoz/common/dashboards:/root/config/dashboards + - signoz-sqlite:/var/lib/signoz/ + signoz-otel-collector: + !!merge <<: *signoz-db-depend + image: signoz/signoz-otel-collector:${OTELCOL_TAG:-v0.111.42} + container_name: signoz-otel-collector + command: + - --config=/etc/otel-collector-config.yaml + - --manager-config=/etc/manager-config.yaml + - --copy-path=/var/tmp/collector-config.yaml + - --feature-gates=-pkg.translator.prometheus.NormalizeName + volumes: + - ${DOCKER_VOLUME_CONFIG}/signoz/common/signoz/otel/otel-collector-config.yaml:/etc/otel-collector-config.yaml + - ${DOCKER_VOLUME_CONFIG}/signoz/common/signoz/otel/otel-collector-opamp-config.yaml:/etc/manager-config.yaml + environment: + OTEL_RESOURCE_ATTRIBUTES: host.name=signoz-host,os.type=linux + LOW_CARDINAL_EXCEPTION_GROUPING: false + ports: + # - "1777:1777" # pprof extension + - "4317:4317" # OTLP gRPC receiver + - "4318:4318" # OTLP HTTP receiver + depends_on: + signoz: + condition: service_healthy + signoz-schema-migrator-sync: + !!merge <<: *signoz-common + image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-v0.111.42} + container_name: schema-migrator-sync + command: + - sync + - --dsn=tcp://clickhouse:9000 + - --up= + depends_on: + signoz-clickhouse: + condition: service_healthy + restart: on-failure + signoz-schema-migrator-async: + !!merge <<: *signoz-db-depend + image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-v0.111.42} + container_name: schema-migrator-async + command: + - async + - --dsn=tcp://clickhouse:9000 + - --up= + restart: on-failure sonarqube: container_name: sonarqube depends_on: @@ -5315,6 +5498,12 @@ volumes: name: semaphore_data semaphore_tmp: name: semaphore_tmp + signoz-clickhouse: + name: signoz-clickhouse + signoz-sqlite: + name: signoz-sqlite + signoz-zookeeper-1: + name: signoz-zookeeper-1 sonarqube-data: name: sonarqube-data sonarqube-db: -- 2.52.0 From ba061e25cbcff7ec475c2e84666529141382ff44 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Tue, 10 Jun 2025 08:12:18 -0400 Subject: [PATCH 2/6] Adding Signoz services. --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index b42b5c00..3e6be4ba 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4586,8 +4586,8 @@ services: - --copy-path=/var/tmp/collector-config.yaml - --feature-gates=-pkg.translator.prometheus.NormalizeName volumes: - - ${DOCKER_VOLUME_CONFIG}/signoz/common/signoz/otel/otel-collector-config.yaml:/etc/otel-collector-config.yaml - - ${DOCKER_VOLUME_CONFIG}/signoz/common/signoz/otel/otel-collector-opamp-config.yaml:/etc/manager-config.yaml + - ${DOCKER_VOLUME_CONFIG}/signoz/common/otel/otel-collector-config.yaml:/etc/otel-collector-config.yaml + - ${DOCKER_VOLUME_CONFIG}/signoz/common/otel/otel-collector-opamp-config.yaml:/etc/manager-config.yaml environment: OTEL_RESOURCE_ATTRIBUTES: host.name=signoz-host,os.type=linux LOW_CARDINAL_EXCEPTION_GROUPING: false -- 2.52.0 From 544e885b11fa19ca1ffa46efde805205b02028ab Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Tue, 10 Jun 2025 13:41:45 -0400 Subject: [PATCH 3/6] Signoz tweaks. --- docker-compose.yml | 63 ++++++++++++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 24 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3e6be4ba..69eb7039 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -60,7 +60,7 @@ x-signoz-common: &signoz-common max-size: 50m max-file: "3" x-signoz-clickhouse-defaults: &signoz-clickhouse-defaults - !!merge <<: *signoz-common + <<: *signoz-common # addding non LTS version due to this fix https://github.com/ClickHouse/ClickHouse/commit/32caf8716352f45c1b617274c7508c86b7d1afab image: clickhouse/clickhouse-server:24.1.2-alpine tty: true @@ -89,7 +89,7 @@ x-signoz-clickhouse-defaults: &signoz-clickhouse-defaults soft: 262144 hard: 262144 x-signoz-zookeeper-defaults: &signoz-zookeeper-defaults - !!merge <<: *signoz-common + <<: *signoz-common image: bitnami/zookeeper:3.7.1 user: root labels: @@ -104,7 +104,7 @@ x-signoz-zookeeper-defaults: &signoz-zookeeper-defaults timeout: 5s retries: 3 x-signoz-db-depend: &signoz-db-depend - !!merge <<: *signoz-common + <<: *signoz-common depends_on: signoz-clickhouse: condition: service_healthy @@ -4496,7 +4496,7 @@ services: - semaphore_data:/var/lib/semaphore - semaphore_tmp:/tmp/semaphore signoz-init-clickhouse: - !!merge <<: *signoz-common + <<: *signoz-common container_name: signoz-init-clickhouse command: - bash @@ -4513,9 +4513,9 @@ services: image: clickhouse/clickhouse-server:24.1.2-alpine restart: on-failure volumes: - - ${DOCKER_VOLUME_CONFIG}/signoz/common/clickhouse/user_scripts:/var/lib/clickhouse/user_scripts/ + - ${DOCKER_VOLUME_CONFIG}/signoz/common/clickhouse/user_scripts/:/var/lib/clickhouse/user_scripts/ signoz-zookeeper-1: - !!merge <<: *signoz-zookeeper-defaults + <<: *signoz-zookeeper-defaults container_name: signoz-zookeeper-1 environment: ZOO_SERVER_ID: 1 @@ -4530,12 +4530,14 @@ services: volumes: - signoz-zookeeper-1:/bitnami/zookeeper signoz-clickhouse: - !!merge <<: *signoz-clickhouse-defaults + <<: *signoz-clickhouse-defaults container_name: signoz-clickhouse - # ports: + expose: + - 9000 + ports: # - "9000:9000" - # - "8123:8123" - # - "9181:9181" + - "8123:8123" + - "9181:9181" volumes: - ${DOCKER_VOLUME_CONFIG}/signoz/common/clickhouse/config.xml:/etc/clickhouse-server/config.xml - ${DOCKER_VOLUME_CONFIG}/signoz/common/clickhouse/users.xml:/etc/clickhouse-server/users.xml @@ -4545,7 +4547,7 @@ services: - signoz-clickhouse:/var/lib/clickhouse/ # - ${DOCKER_VOLUME_CONFIG}/signoz/common/clickhouse/storage.xml:/etc/clickhouse-server/config.d/storage.xml signoz: - !!merge <<: *signoz-db-depend + <<: *signoz-db-depend container_name: signoz command: - --config=/root/config/prometheus.yml @@ -4569,54 +4571,67 @@ services: timeout: 5s retries: 3 image: signoz/signoz:${VERSION:-v0.86.2} + labels: + homepage.group: Infrastructure/App Performance Monitoring + homepage.name: Signoz + homepage.href: https://apm.${MY_TLD} + homepage.icon: signoz.svg + homepage.description: Logs, metrics, and traces in a single pane + swag: enable + swag_proto: http + swag_port: 8080 + swag_url: apm.${MY_TLD} + swag.uptime-kuma.enabled: true + swag.uptime-kuma.monitor.url: https://apm.${MY_TLD} + swag.uptime-kuma.monitor.interval: 300 ports: - 36113:8080 # signoz port # - "6060:6060" # pprof port volumes: - - ${DOCKER_VOLUME_CONFIG}/signoz/common/signoz/prometheus.yml:/root/config/prometheus.yml + - ${DOCKER_VOLUME_CONFIG}/signoz/common/prometheus.yml:/root/config/prometheus.yml - ${DOCKER_VOLUME_CONFIG}/signoz/common/dashboards:/root/config/dashboards - signoz-sqlite:/var/lib/signoz/ signoz-otel-collector: - !!merge <<: *signoz-db-depend - image: signoz/signoz-otel-collector:${OTELCOL_TAG:-v0.111.42} + <<: *signoz-db-depend container_name: signoz-otel-collector command: - --config=/etc/otel-collector-config.yaml - --manager-config=/etc/manager-config.yaml - --copy-path=/var/tmp/collector-config.yaml - --feature-gates=-pkg.translator.prometheus.NormalizeName - volumes: - - ${DOCKER_VOLUME_CONFIG}/signoz/common/otel/otel-collector-config.yaml:/etc/otel-collector-config.yaml - - ${DOCKER_VOLUME_CONFIG}/signoz/common/otel/otel-collector-opamp-config.yaml:/etc/manager-config.yaml + depends_on: + signoz: + condition: service_healthy environment: OTEL_RESOURCE_ATTRIBUTES: host.name=signoz-host,os.type=linux LOW_CARDINAL_EXCEPTION_GROUPING: false + image: signoz/signoz-otel-collector:${OTELCOL_TAG:-v0.111.42} ports: # - "1777:1777" # pprof extension - "4317:4317" # OTLP gRPC receiver - "4318:4318" # OTLP HTTP receiver - depends_on: - signoz: - condition: service_healthy + volumes: + - ${DOCKER_VOLUME_CONFIG}/signoz/common/otel/otel-collector-config.yaml:/etc/otel-collector-config.yaml + - ${DOCKER_VOLUME_CONFIG}/signoz/common/otel/otel-collector-opamp-config.yaml:/etc/manager-config.yaml signoz-schema-migrator-sync: - !!merge <<: *signoz-common + <<: *signoz-common image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-v0.111.42} container_name: schema-migrator-sync command: - sync - - --dsn=tcp://clickhouse:9000 + - --dsn=tcp://signoz-clickhouse:9000 - --up= depends_on: signoz-clickhouse: condition: service_healthy restart: on-failure signoz-schema-migrator-async: - !!merge <<: *signoz-db-depend + <<: *signoz-db-depend image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-v0.111.42} container_name: schema-migrator-async command: - async - - --dsn=tcp://clickhouse:9000 + - --dsn=tcp://signoz-clickhouse:9000 - --up= restart: on-failure sonarqube: -- 2.52.0 From f62d14affd58a637329df981d8047692e1dff36c Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Tue, 10 Jun 2025 13:41:45 -0400 Subject: [PATCH 4/6] Signoz configurations. --- .../app-configs/signoz_common_clickhouse_cluster.ha.xml.j2 | 4 ++-- ansible/app-configs/signoz_common_clickhouse_cluster.xml.j2 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible/app-configs/signoz_common_clickhouse_cluster.ha.xml.j2 b/ansible/app-configs/signoz_common_clickhouse_cluster.ha.xml.j2 index 5c208815..c2d4368e 100644 --- a/ansible/app-configs/signoz_common_clickhouse_cluster.ha.xml.j2 +++ b/ansible/app-configs/signoz_common_clickhouse_cluster.ha.xml.j2 @@ -7,7 +7,7 @@ --> - zookeeper-1 + signoz-zookeeper-1 2181 @@ -52,7 +52,7 @@ - clickhouse + signoz-clickhouse 9000 diff --git a/ansible/app-configs/signoz_common_clickhouse_cluster.xml.j2 b/ansible/app-configs/signoz_common_clickhouse_cluster.xml.j2 index 8b475ffe..3456393b 100644 --- a/ansible/app-configs/signoz_common_clickhouse_cluster.xml.j2 +++ b/ansible/app-configs/signoz_common_clickhouse_cluster.xml.j2 @@ -7,7 +7,7 @@ --> - zookeeper-1 + signoz-zookeeper-1 2181 - clickhouse + signoz-clickhouse 9000 -- 2.52.0 From 55171ada4b5ec10b41ea315f04637192afec6a80 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Wed, 11 Jun 2025 07:41:22 -0400 Subject: [PATCH 5/6] Signoz container name change. --- docker-compose.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 69eb7039..7eb34ddc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4546,9 +4546,9 @@ services: - ${DOCKER_VOLUME_CONFIG}/signoz/common/clickhouse/cluster.xml:/etc/clickhouse-server/config.d/cluster.xml - signoz-clickhouse:/var/lib/clickhouse/ # - ${DOCKER_VOLUME_CONFIG}/signoz/common/clickhouse/storage.xml:/etc/clickhouse-server/config.d/storage.xml - signoz: + signoz-app: <<: *signoz-db-depend - container_name: signoz + container_name: signoz-app command: - --config=/root/config/prometheus.yml environment: @@ -4586,7 +4586,7 @@ services: swag.uptime-kuma.monitor.interval: 300 ports: - 36113:8080 # signoz port - # - "6060:6060" # pprof port + # - "6060:6060" # pprof port volumes: - ${DOCKER_VOLUME_CONFIG}/signoz/common/prometheus.yml:/root/config/prometheus.yml - ${DOCKER_VOLUME_CONFIG}/signoz/common/dashboards:/root/config/dashboards -- 2.52.0 From 4404422b2083a00611b847660f413cdd34a9a403 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Wed, 11 Jun 2025 11:44:49 +0000 Subject: [PATCH 6/6] chore: Update README --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 95b6e3da..a96c0780 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,13 @@ | scrutiny | ghcr.io/analogj/scrutiny:master-omnibus | | searxng | searxng/searxng:latest | | semaphore | semaphoreui/semaphore:v2.12.14 | +| signoz-init-clickhouse | clickhouse/clickhouse-server:24.1.2-alpine | +| signoz-zookeeper-1 | bitnami/zookeeper:3.7.1 | +| signoz-clickhouse | clickhouse/clickhouse-server:24.1.2-alpine | +| signoz-app | signoz/signoz:v0.86.2 | +| signoz-otel-collector | signoz/signoz-otel-collector:v0.111.42 | +| signoz-schema-migrator-sync | signoz/signoz-schema-migrator:v0.111.42 | +| signoz-schema-migrator-async | signoz/signoz-schema-migrator:v0.111.42 | | sonarqube | mc1arke/sonarqube-with-community-branch-plugin:lts | | sonarqube-pg-db | postgres:17-alpine | | sonarr | lscr.io/linuxserver/sonarr:latest | -- 2.52.0