From fe97056d19f3f754da06a405133f890e1808a9d2 Mon Sep 17 00:00:00 2001 From: "push-app-to-main[bot]" <203845782+push-app-to-main[bot]@users.noreply.github.com> Date: Mon, 15 Sep 2025 10:42:57 +0200 Subject: [PATCH] SigNoz (#7648) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 'Add new script' * Change application name from 'signoz' to 'SigNoz' * Update signoz-install.sh * Update signoz-install.sh --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com> Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- ct/headers/signoz | 6 + ct/signoz.sh | 63 ++++++++ frontend/public/json/signoz.json | 40 +++++ install/signoz-install.sh | 262 +++++++++++++++++++++++++++++++ 4 files changed, 371 insertions(+) create mode 100644 ct/headers/signoz create mode 100644 ct/signoz.sh create mode 100644 frontend/public/json/signoz.json create mode 100644 install/signoz-install.sh diff --git a/ct/headers/signoz b/ct/headers/signoz new file mode 100644 index 000000000..68b75d640 --- /dev/null +++ b/ct/headers/signoz @@ -0,0 +1,6 @@ + _ + _____(_)___ _____ ____ ____ + / ___/ / __ `/ __ \/ __ \/_ / + (__ ) / /_/ / / / / /_/ / / /_ +/____/_/\__, /_/ /_/\____/ /___/ + /____/ diff --git a/ct/signoz.sh b/ct/signoz.sh new file mode 100644 index 000000000..1b4514ef3 --- /dev/null +++ b/ct/signoz.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://signoz.io/ + +APP="SigNoz" +var_tags="${var_tags:-notes}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-20}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/signoz ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "signoz" "SigNoz/signoz"; then + msg_info "Stopping Services" + systemctl stop signoz + systemctl stop signoz-otel-collector + msg_ok "Stopped Services" + + fetch_and_deploy_gh_release "signoz" "SigNoz/signoz" "prebuild" "latest" "/opt/signoz" "signoz-community_linux_amd64.tar.gz" + fetch_and_deploy_gh_release "signoz-otel-collector" "SigNoz/signoz-otel-collector" "prebuild" "latest" "/opt/signoz-otel-collector" "signoz-otel-collector_linux_amd64.tar.gz" + fetch_and_deploy_gh_release "signoz-schema-migrator" "SigNoz/signoz-otel-collector" "prebuild" "latest" "/opt/signoz-schema-migrator" "signoz-schema-migrator_linux_amd64.tar.gz" + + msg_info "Updating ${APP}" + cd /opt/signoz-schema-migrator/bin + $STD ./signoz-schema-migrator sync --dsn="tcp://localhost:9000?password=" --replication=true --up= + $STD ./signoz-schema-migrator async --dsn="tcp://localhost:9000?password=" --replication=true --up= + msg_ok "Updated $APP" + + msg_info "Starting Services" + systemctl start signoz-otel-collector + systemctl start signoz + msg_ok "Started Services" + msg_ok "Updated Successfully" + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}" diff --git a/frontend/public/json/signoz.json b/frontend/public/json/signoz.json new file mode 100644 index 000000000..07b532b0c --- /dev/null +++ b/frontend/public/json/signoz.json @@ -0,0 +1,40 @@ +{ + "name": "SigNoz", + "slug": "signoz", + "categories": [ + 9 + ], + "date_created": "2025-09-12", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8080, + "documentation": "https://signoz.io/docs/introduction/", + "config_path": "/opt/signoz/conf/systemd.env", + "website": "https://signoz.io/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/signoz.webp", + "description": "SigNoz is an open-source Datadog or New Relic alternative. Get APM, logs, traces, metrics, exceptions, & alerts in a single tool.", + "install_methods": [ + { + "type": "default", + "script": "ct/signoz.sh", + "resources": { + "cpu": 2, + "ram": 4096, + "hdd": 20, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "The first user you register will be the admin user.", + "type": "info" + } + ] +} diff --git a/install/signoz-install.sh b/install/signoz-install.sh new file mode 100644 index 000000000..bb63e2ff0 --- /dev/null +++ b/install/signoz-install.sh @@ -0,0 +1,262 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://signoz.io/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + apt-transport-https \ + ca-certificates +msg_ok "Installed Dependencies" + +JAVA_VERSION="21" setup_java + +msg_info "Setting up ClickHouse" +curl -fsSL "https://packages.clickhouse.com/rpm/lts/repodata/repomd.xml.key" | gpg --dearmor -o /usr/share/keyrings/clickhouse-keyring.gpg +echo "deb [signed-by=/usr/share/keyrings/clickhouse-keyring.gpg arch=amd64] https://packages.clickhouse.com/deb stable main" >/etc/apt/sources.list.d/clickhouse.list +$STD apt-get update +export DEBIAN_FRONTEND=noninteractive +$STD apt-get install -y clickhouse-server clickhouse-client +msg_ok "Setup ClickHouse" + +msg_info "Setting up Zookeeper" +curl -fsSL "https://dlcdn.apache.org/zookeeper/zookeeper-3.8.4/apache-zookeeper-3.8.4-bin.tar.gz" -o "$HOME/zookeeper.tar.gz" +tar -xzf "$HOME/zookeeper.tar.gz" -C "$HOME" +mkdir -p /opt/zookeeper +mkdir -p /var/lib/zookeeper +mkdir -p /var/log/zookeeper +cp -r ~/apache-zookeeper-3.8.4-bin/* /opt/zookeeper + +cat </opt/zookeeper/conf/zoo.cfg +tickTime=2000 +dataDir=/var/lib/zookeeper +clientPort=2181 +admin.serverPort=3181 +EOF + +cat </opt/zookeeper/conf/zoo.env +ZOO_LOG_DIR=/var/log/zookeeper +EOF + +cat </etc/systemd/system/zookeeper.service +[Unit] +Description=Zookeeper +Documentation=http://zookeeper.apache.org + +[Service] +EnvironmentFile=/opt/zookeeper/conf/zoo.env +Type=forking +WorkingDirectory=/opt/zookeeper +ExecStart=/opt/zookeeper/bin/zkServer.sh start /opt/zookeeper/conf/zoo.cfg +ExecStop=/opt/zookeeper/bin/zkServer.sh stop /opt/zookeeper/conf/zoo.cfg +ExecReload=/opt/zookeeper/bin/zkServer.sh restart /opt/zookeeper/conf/zoo.cfg +TimeoutSec=30 +Restart=on-failure + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now zookeeper +msg_ok "Setup Zookeeper" + +msg_info "Configuring ClickHouse" +cat </etc/clickhouse-server/config.d/cluster.xml + + + /clickhouse/task_queue/ddl + + + + + + 127.0.0.1 + 9000 + + + + + + + 127.0.0.1 + 2181 + + + + 01 + 01 + + +EOF +systemctl enable -q --now clickhouse-server +msg_ok "Configured ClickHouse" + +fetch_and_deploy_gh_release "signoz-schema-migrator" "SigNoz/signoz-otel-collector" "prebuild" "latest" "/opt/signoz-schema-migrator" "signoz-schema-migrator_linux_amd64.tar.gz" + +msg_info "Running ClickHouse migrations" +cd /opt/signoz-schema-migrator/bin +$STD ./signoz-schema-migrator sync --dsn="tcp://localhost:9000?password=" --replication=true --up= +$STD ./signoz-schema-migrator async --dsn="tcp://localhost:9000?password=" --replication=true --up= +msg_ok "ClickHouse Migrations Completed" + +fetch_and_deploy_gh_release "signoz" "SigNoz/signoz" "prebuild" "latest" "/opt/signoz" "signoz-community_linux_amd64.tar.gz" + +msg_info "Setting up SigNoz" +mkdir -p /var/lib/signoz +cat </opt/signoz/conf/systemd.env +SIGNOZ_INSTRUMENTATION_LOGS_LEVEL=info +INVITE_EMAIL_TEMPLATE=/opt/signoz/templates/invitation_email_template.html +SIGNOZ_SQLSTORE_SQLITE_PATH=/var/lib/signoz/signoz.db +SIGNOZ_WEB_ENABLED=true +SIGNOZ_WEB_DIRECTORY=/opt/signoz/web +SIGNOZ_JWT_SECRET=secret +SIGNOZ_ALERTMANAGER_PROVIDER=signoz +SIGNOZ_TELEMETRYSTORE_PROVIDER=clickhouse +SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN=tcp://localhost:9000?password= +DOT_METRICS_ENABLED=true +EOF + +cat </etc/systemd/system/signoz.service +[Unit] +Description=SigNoz +Documentation=https://signoz.io/docs +After=clickhouse-server.service + +[Service] +Type=simple +KillMode=mixed +Restart=on-failure +WorkingDirectory=/opt/signoz +EnvironmentFile=/opt/signoz/conf/systemd.env +ExecStart=/opt/signoz/bin/signoz server + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now signoz +msg_ok "Setup Signoz" + +fetch_and_deploy_gh_release "signoz-otel-collector" "SigNoz/signoz-otel-collector" "prebuild" "latest" "/opt/signoz-otel-collector" "signoz-otel-collector_linux_amd64.tar.gz" + +msg_info "Setting up SigNoz OTel Collector" +mkdir -p /var/lib/signoz-otel-collector +cat </opt/signoz-otel-collector/conf/config.yaml +receivers: + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + max_recv_msg_size_mib: 16 + http: + endpoint: 0.0.0.0:4318 + jaeger: + protocols: + grpc: + endpoint: 0.0.0.0:14250 + thrift_http: + endpoint: 0.0.0.0:14268 + httplogreceiver/heroku: + endpoint: 0.0.0.0:8081 + source: heroku + httplogreceiver/json: + endpoint: 0.0.0.0:8082 + source: json +processors: + batch: + send_batch_size: 50000 + timeout: 1s + signozspanmetrics/delta: + metrics_exporter: signozclickhousemetrics + latency_histogram_buckets: [100us, 1ms, 2ms, 6ms, 10ms, 50ms, 100ms, 250ms, 500ms, 1000ms, 1400ms, 2000ms, 5s, 10s, 20s, 40s, 60s] + dimensions_cache_size: 100000 + dimensions: + - name: service.namespace + default: default + - name: deployment.environment + default: default + - name: signoz.collector.id + aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA +extensions: + health_check: + endpoint: 0.0.0.0:13133 + zpages: + endpoint: localhost:55679 + pprof: + endpoint: localhost:1777 +exporters: + clickhousetraces: + datasource: tcp://localhost:9000/signoz_traces?password= + use_new_schema: true + signozclickhousemetrics: + dsn: tcp://localhost:9000/signoz_metrics?password= + timeout: 45s + clickhouselogsexporter: + dsn: tcp://localhost:9000/signoz_logs?password= + timeout: 10s + use_new_schema: true + metadataexporter: + dsn: tcp://localhost:9000/signoz_metadata?password= + timeout: 10s + tenant_id: default + cache: + provider: in_memory +service: + telemetry: + logs: + encoding: json + extensions: [health_check, zpages, pprof] + pipelines: + traces: + receivers: [otlp, jaeger] + processors: [signozspanmetrics/delta, batch] + exporters: [clickhousetraces, metadataexporter] + metrics: + receivers: [otlp] + processors: [batch] + exporters: [metadataexporter, signozclickhousemetrics] + logs: + receivers: [otlp, httplogreceiver/heroku, httplogreceiver/json] + processors: [batch] + exporters: [clickhouselogsexporter, metadataexporter] +EOF + +cat </opt/signoz-otel-collector/conf/opamp.yaml +server_endpoint: ws://127.0.0.1:4320/v1/opamp +EOF + +cat </etc/systemd/system/signoz-otel-collector.service +[Unit] +Description=SigNoz OTel Collector +Documentation=https://signoz.io/docs +After=clickhouse-server.service + +[Service] +Type=simple +KillMode=mixed +Restart=on-failure +WorkingDirectory=/opt/signoz-otel-collector +ExecStart=/opt/signoz-otel-collector/bin/signoz-otel-collector --config=/opt/signoz-otel-collector/conf/config.yaml --manager-config=/opt/signoz-otel-collector/conf/opamp.yaml --copy-path=/var/lib/signoz-otel-collector/config.yaml + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now signoz-otel-collector + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf ~/zookeeper.tar.gz +rm -rf ~/apache-zookeeper-3.8.4-bin +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned"