Back to articles
AI & Cloud

Building a Log Analysis System with Signoz: An Effective Datadog Replacement at Zero Cost

A detailed guide to building a self-hosted log analysis system with Signoz, an open-source solution that effectively replaces Datadog at zero cost. The article covers installation,...

DPTCloud Engineering4 min read
Building a Log Analysis System with Signoz: An Effective Datadog Replacement at Zero Cost

In today's rapidly evolving distributed application landscape, log monitoring and analysis are critical for ensuring system performance, stability, and fast response to issues. Datadog is one of the leading solutions, but its high cost and vendor dependency drive many organizations to seek alternatives. Signoz, an open-source observability platform integrating logs, metrics, and traces into a single interface, offers an effective, flexible, and completely free solution for self-hosted monitoring. This guide walks you through building a log analysis system with Signoz, replacing Datadog at zero cost.

1. Introducing Signoz and the Benefits of Self-Hosting

Signoz is an open-source observability platform that unifies logs, metrics, and traces on a single interface. It uses OpenTelemetry for data collection and ClickHouse for efficient storage. Compared to Datadog, Signoz has no subscription fees, giving you full control over your data and infrastructure. It’s ideal for MVPs, startups, or businesses aiming to reduce operational costs while maintaining a powerful monitoring system.

Key advantages of Signoz:

  • Completely free and open-source (Apache 2.0 license)
  • Integrates with OpenTelemetry, supporting multiple programming languages
  • Scalable with ClickHouse, Prometheus, and Grafana
  • Designed for self-hosting, deployable on VPS or dedicated servers

2. Prerequisites and Environment Setup

To deploy Signoz, you need a server with at least 4GB RAM and 2 vCPU. Follow these setup steps:

Requirements:

  • VPS or dedicated server (minimum 4GB RAM, 2 vCPU)
  • Operating system: Linux (Ubuntu 20.04 or later)
  • Docker and Docker Compose installed
  • Stable internet connection

Run the following commands to verify Docker and Docker Compose are installed:

docker --version
docker-compose --version

3. Deploying Signoz on a VPS

Signoz provides a docker-compose.yml file to deploy the full stack. Follow these steps:

  1. Create a new directory and navigate into it:
  2. mkdir signoz && cd signoz
  3. Create a docker-compose.yml file with the following content:
  4. version: '3.7'
    services:
      signoz-frontend:
        image: signoz/signoz:0.12.0
        ports:
          - "3301:3301"
        depends_on:
          - signoz-zipkin
          - signoz-otel-collector
          - signoz-clickhouse
        environment:
          - SIGNOZ_BACKEND_HOST=signoz-otel-collector:4317
          - SIGNOZ_FRONTEND_HOST=signoz-frontend:3301
          - SIGNOZ_CLICKHOUSE_HOST=signoz-clickhouse:8123
          - SIGNOZ_ZIPKIN_HOST=signoz-zipkin:9411
        restart: unless-stopped
    
      signoz-otel-collector:
        image: signoz/otel-collector:0.12.0
        ports:
          - "4317:4317"
          - "4318:4318"
        volumes:
          - ./otel-config.yaml:/otel-config.yaml
        command: ["--config", "/otel-config.yaml"]
        restart: unless-stopped
    
      signoz-clickhouse:
        image: clickhouse/clickhouse-server:22.3
        ports:
          - "8123:8123"
          - "9000:9000"
        volumes:
          - ./clickhouse-data:/var/lib/clickhouse
        environment:
          - CLICKHOUSE_DB=signoz
        restart: unless-stopped
    
      signoz-zipkin:
        image: openzipkin/zipkin:2.23
        ports:
          - "9411:9411"
        restart: unless-stopped
  5. Create an otel-config.yaml file to configure OpenTelemetry:
  6. receivers:
      otlp:
        protocols:
          grpc:
          http:
    
    processors:
      batch:
        timeout: 10s
    
    exporters:
      clickhouse:
        endpoint: http://signoz-clickhouse:8123
        database: signoz
        username: default
        password: ""
        table: logs
    
      zipkin:
        endpoint: http://signoz-zipkin:9411/api/v2/spans
    
    service:
      pipelines:
        logs:
          receivers: [otlp]
          processors: [batch]
          exporters: [clickhouse, zipkin]
  7. Run the deployment command:
  8. docker-compose up -d

4. Integrating Applications with Signoz

To send logs from your application to Signoz, configure the OpenTelemetry SDK. Here’s an example for Node.js:

const { OTLPLogExporter } = require('@opentelemetry/exporter-otlp-proto');
const { LogRecordProcessor } = require('@opentelemetry/sdk-logs');

const exporter = new OTLPLogExporter({
  url: 'http://:4318',
  headers: {},
});

const processor = new LogRecordProcessor(exporter);
const logger = new Logger({ processor });

Replace <your-vps-ip> with your VPS’s IP address. After deployment, access Signoz at http://:3301.

5. Verification and Troubleshooting

Check the system’s operation with these steps:

  • Access http://:3301 to view the Signoz interface
  • Run docker-compose ps to check container status
  • Ensure ports 3301, 4317, 8123, 9000, and 9411 are open on your VPS

Troubleshooting:

  • Cannot access Signoz? Check firewall and port configurations
  • Logs not appearing? Verify OpenTelemetry configuration and exporter settings
  • ClickHouse not working? Check volume mounts and data persistence

6. Conclusion

Signoz is a powerful, effective, and completely free open-source solution to replace Datadog. By deploying it on a VPS, you gain full control over your infrastructure and data, significantly reducing operational costs. This guide provides the essential steps to build a self-hosted log analysis system, suitable for small projects, startups, or businesses focused on cost efficiency.

Learn more:

Related infrastructure & engineering guides: High-RAM Cloud VPS for Self-Hosted LLMs & API Gateways

DPTCloud Tier III Infrastructure

High-RAM Cloud VPS Plans Optimized for AI, Databases & Cache

Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.

View 22 VPS Plans
ECO · vn-02Recommended

VPS-4E

297.000 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe
ECO · vn-02

VPS-5E

614.900 ₫ / mo

10% VAT included

  • CPU: 8 vCPU
  • RAM: 16 GB
  • SSD: 100 GB NVMe
ADVANCED · vn-03Recommended

VPS-4T

548.900 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe

Related Articles

View all
ZaloZalo SupportDiscord0384 753 478