Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .env.docker.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ COMPOSE_PROFILES=nango,signoz,otel-collector,jaeger
# Once set, it cannot be changed without losing existing encrypted data
NANGO_ENCRYPTION_KEY=<REPLACE_WITH_NANGO_ENCRYPTION_KEY>

SIGNOZ_USER_ROOT_ENABLED=true
SIGNOZ_USER_ROOT_EMAIL=admin@localhost.dev
SIGNOZ_USER_ROOT_PASSWORD=LocalDev1234@
SIGNOZ_USER_ROOT_ORG_NAME=default

# Uncomment and replace these with your <vm_ip> in production!
# NANGO_SERVER_URL=http://<vm_ip>:3050
# NANGO_PUBLIC_CONNECT_URL=http://<vm_ip>:3051
Expand Down
72 changes: 32 additions & 40 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ x-signoz-db-depend: &signoz-db-depend
depends_on:
signoz-clickhouse:
condition: service_healthy
signoz-schema-migrator-sync:
condition: service_completed_successfully

services:
# Nango
Expand Down Expand Up @@ -196,26 +194,21 @@ services:
signoz-server:
!!merge <<: *signoz-db-depend
profiles: [ "signoz" ]
image: signoz/signoz:v0.96.1
image: signoz/signoz:v0.114.1
container_name: signoz-server
command:
- --config=/root/config/prometheus.yml
ports:
- "3080:8080"
volumes:
- ./signoz/dashboards:/root/config/dashboards
- ./signoz/signoz/prometheus.yml:/root/config/prometheus.yml
- signoz-db:/var/lib/signoz/
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
- DOT_METRICS_ENABLED=true
- SIGNOZ_TOKENIZER_JWT_SECRET=secret
- SIGNOZ_USER_ROOT_ENABLED=${SIGNOZ_USER_ROOT_ENABLED:-false}
- SIGNOZ_USER_ROOT_EMAIL=${SIGNOZ_USER_ROOT_EMAIL:-}
- SIGNOZ_USER_ROOT_PASSWORD=${SIGNOZ_USER_ROOT_PASSWORD:-}
- SIGNOZ_USER_ROOT_ORG_NAME=${SIGNOZ_USER_ROOT_ORG_NAME:-default}
healthcheck:
test:
- CMD
Expand All @@ -232,19 +225,25 @@ services:
signoz-otel-collector:
!!merge <<: *signoz-db-depend
profiles: [ "signoz" ]
image: signoz/signoz-otel-collector:v0.129.6
image: signoz/signoz-otel-collector:v0.144.2
container_name: signoz-otel-collector
entrypoint:
- /bin/sh
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
- -c
- |
/signoz-otel-collector migrate sync check &&
/signoz-otel-collector --config=/etc/otel-collector-config.yaml --manager-config=/etc/manager-config.yaml --copy-path=/var/tmp/collector-config.yaml
volumes:
- ./signoz/otel-collector-config.yaml:/etc/otel-collector-config.yaml
- ./signoz/signoz/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
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN=tcp://signoz-clickhouse:9000
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_CLUSTER=cluster
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_REPLICATION=true
- SIGNOZ_OTEL_COLLECTOR_TIMEOUT=10m
ports:
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP HTTP receiver
Expand All @@ -254,31 +253,24 @@ services:
networks:
- signoz-net

signoz-schema-migrator-sync:
!!merge <<: *signoz-common
profiles: [ "signoz" ]
image: signoz/signoz-schema-migrator:v0.129.6
container_name: signoz-schema-migrator-sync
command:
- sync
- --dsn=tcp://signoz-clickhouse:9000
- --up=
depends_on:
signoz-clickhouse:
condition: service_healthy
networks:
- signoz-net
restart: on-failure

signoz-schema-migrator-async:
signoz-telemetrystore-migrator:
!!merge <<: *signoz-db-depend
profiles: [ "signoz" ]
image: signoz/signoz-schema-migrator:v0.129.6
container_name: signoz-schema-migrator-async
image: signoz/signoz-otel-collector:v0.144.2
container_name: signoz-telemetrystore-migrator
environment:
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN=tcp://signoz-clickhouse:9000
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_CLUSTER=cluster
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_REPLICATION=true
- SIGNOZ_OTEL_COLLECTOR_TIMEOUT=10m
entrypoint:
- /bin/sh
command:
- async
- --dsn=tcp://signoz-clickhouse:9000
- --up=
- -c
- |
/signoz-otel-collector migrate bootstrap &&
/signoz-otel-collector migrate sync up &&
/signoz-otel-collector migrate async up
networks:
- signoz-net
restart: on-failure
Expand Down
31 changes: 19 additions & 12 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,24 @@ cmd_setup() {
set_env_var "$COMPANION_ENV" "COMPOSE_PROFILES" "nango,signoz,otel-collector,jaeger"
echo -e " ${GREEN}✓${NC} COMPOSE_PROFILES set"

# SigNoz credentials — single source of truth for root-user provisioning + API key automation.
SIGNOZ_URL="http://localhost:3080"
SIGNOZ_USER_ROOT_EMAIL="admin@localhost.dev"
SIGNOZ_USER_ROOT_PASSWORD='LocalDev1234@'
SIGNOZ_USER_ROOT_ORG_NAME="default"

set_env_var "$COMPANION_ENV" "SIGNOZ_USER_ROOT_EMAIL" "$SIGNOZ_USER_ROOT_EMAIL"
set_env_var "$COMPANION_ENV" "SIGNOZ_USER_ROOT_PASSWORD" "$SIGNOZ_USER_ROOT_PASSWORD"
set_env_var "$COMPANION_ENV" "SIGNOZ_USER_ROOT_ORG_NAME" "$SIGNOZ_USER_ROOT_ORG_NAME"
EXISTING_SIGNOZ_KEY="$(get_env_var "$ENV_FILE" "SIGNOZ_API_KEY")"
if [ -n "$EXISTING_SIGNOZ_KEY" ]; then
set_env_var "$COMPANION_ENV" "SIGNOZ_USER_ROOT_ENABLED" "false"
echo -e " ${GREEN}✓${NC} SigNoz root user skipped (API key already exists)"
else
set_env_var "$COMPANION_ENV" "SIGNOZ_USER_ROOT_ENABLED" "true"
echo -e " ${GREEN}✓${NC} SigNoz root user configured"
fi

# ── Start Docker Compose ─────────────────────────────────────────────────
echo ""
echo "Starting optional services..."
Expand All @@ -226,7 +244,6 @@ cmd_setup() {

# OTEL vars (no auth required for sending traces)
set_env_var "$ENV_FILE" "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT" "http://localhost:14318/v1/traces"
set_env_var "$ENV_FILE" "OTEL_SERVICE_NAME" "inkeep-agents"
echo -e " ${GREEN}✓${NC} OTEL env vars written to .env"

# SigNoz (non-fatal — SigNoz has many infra services and may be slow to start)
Expand All @@ -250,20 +267,10 @@ cmd_setup() {
elif [ "$SIGNOZ_READY" = "0" ]; then
echo -e " ${YELLOW}⚠️ Skipped — SigNoz not ready yet. Re-run 'pnpm setup-dev:optional' once it's up.${NC}"
else
SIGNOZ_URL="http://localhost:3080"
SIGNOZ_EMAIL="admin@localhost.dev"
SIGNOZ_PASSWORD='LocalDev1234@'

# Register admin (idempotent — fails silently on re-run)
curl -s -X POST "$SIGNOZ_URL/api/v1/register" \
-H "Content-Type: application/json" \
-d "{\"name\":\"Admin\",\"email\":\"$SIGNOZ_EMAIL\",\"password\":\"$SIGNOZ_PASSWORD\",\"orgDisplayName\":\"Local Dev\"}" \
>/dev/null 2>&1 || true

# Login to get JWT (use -s without -f so we get the response body on errors too)
LOGIN_RESPONSE=$(curl -s -X POST "$SIGNOZ_URL/api/v1/login" \
-H "Content-Type: application/json" \
-d "{\"email\":\"$SIGNOZ_EMAIL\",\"password\":\"$SIGNOZ_PASSWORD\"}" 2>/dev/null || echo "")
-d "{\"email\":\"$SIGNOZ_USER_ROOT_EMAIL\",\"password\":\"$SIGNOZ_USER_ROOT_PASSWORD\"}" 2>/dev/null || echo "")

if [ -n "$LOGIN_RESPONSE" ]; then
ACCESS_TOKEN=$(echo "$LOGIN_RESPONSE" | node -e "const d=JSON.parse(require('fs').readFileSync(0,'utf8'));console.log((d.data||d).accessJwt||'')" 2>/dev/null || echo "")
Expand Down
35 changes: 31 additions & 4 deletions signoz/otel-collector-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
connectors:
signozmeter:
metrics_flush_interval: 1h
dimensions:
- name: service.name
- name: deployment.environment
- name: host.name
receivers:
otlp:
protocols:
Expand All @@ -19,7 +26,12 @@ receivers:
processors:
batch:
send_batch_size: 1
send_batch_max_size: 11000
timeout: 10s
batch/meter:
send_batch_max_size: 25000
send_batch_size: 20000
timeout: 1s
resourcedetection:
# Using OTEL_RESOURCE_ATTRIBUTES envvar, env detector adds custom labels.
detectors: [env, system]
Expand Down Expand Up @@ -65,6 +77,17 @@ exporters:
dsn: tcp://signoz-clickhouse:9000/signoz_logs
timeout: 10s
use_new_schema: true
signozclickhousemeter:
dsn: tcp://signoz-clickhouse:9000/signoz_meter
timeout: 45s
sending_queue:
enabled: false
metadataexporter:
cache:
provider: in_memory
dsn: tcp://signoz-clickhouse:9000/signoz_metadata
enabled: true
timeout: 45s
service:
telemetry:
logs:
Expand All @@ -76,16 +99,20 @@ service:
traces:
receivers: [otlp]
processors: [signozspanmetrics/delta, batch]
exporters: [clickhousetraces]
exporters: [clickhousetraces, metadataexporter, signozmeter]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [signozclickhousemetrics]
exporters: [signozclickhousemetrics, metadataexporter, signozmeter]
metrics/prometheus:
receivers: [prometheus]
processors: [batch]
exporters: [signozclickhousemetrics]
exporters: [signozclickhousemetrics, metadataexporter, signozmeter]
logs:
receivers: [otlp]
processors: [batch]
exporters: [clickhouselogsexporter]
exporters: [clickhouselogsexporter, metadataexporter, signozmeter]
metrics/meter:
receivers: [signozmeter]
processors: [batch/meter]
exporters: [signozclickhousemeter]