DEV Community

Cover image for I built an Open Source Datadog alternative because ELK was eating my RAM (SvelteKit 5 + TimescaleDB)
Polliog
Polliog

Posted on

I built an Open Source Datadog alternative because ELK was eating my RAM (SvelteKit 5 + TimescaleDB)

The Problem: Observability is expensive (or heavy)

I love building side projects. But every time I deploy a new app, I face the same dilemma regarding logs and monitoring:

  1. SaaS tools (Datadog, Splunk): They offer an amazing UX, but the pricing is prohibitive for indie hackers or small European SMBs. Plus, I often want to keep user data within the EU for GDPR compliance.

  2. Self-Hosted (ELK Stack): It's the industry standard, but running ElasticSearch for a simple project is like killing a fly with a bazooka. It eats 4GB+ of RAM just to sit idle.

I wanted something in the middle: Self-hosted, lightweight, GDPR-compliant, and with a modern DX.

So I built LogWard.

What is LogWard?

LogWard is an open-source (AGPLv3) log management platform. You can think of it as a lightweight, privacy-first Datadog that you can run on a $5 VPS using Docker.

It’s designed to be "install and forget".

The Tech Stack (The fun part)

I used this project to deep-dive into the latest tech. Here is what's under the hood:

  1. Frontend: SvelteKit 5: I wanted to test the new reactivity system. Managing the "Live Tail" log stream using $state and $derived was incredibly smooth compared to the old store model. The UI is built with shadcn-svelte.

  2. Database: TimescaleDB: instead of ElasticSearch. It's a PostgreSQL extension optimized for time-series. It gives me SQL power, automatic compression (amazing for logs), and blazing fast ingestion without the JVM memory overhead.

  3. Backend: Fastify + TypeScript.

  4. Queue: Redis + BullMQ.

Key Features (v0.2.0)

I just released version 0.2.0, which brings LogWard from a "log viewer" to a real observability tool:

  1. OpenTelemetry Support: Native OTLP ingestion. You can use standard OTel collectors to send logs and traces.

  2. Distributed Tracing: visualize spans and find bottlenecks in your microservices.

  3. Sigma Rules: A built-in security engine that runs standard YAML detection rules against your logs (turning it into a lightweight SIEM).

  4. Multi-Tenancy: Organize logs by Organization -> Project.

How to try it (5 Minutes)

You have two options to test it out.

Option 1: Self-Hosted (Docker)

If you have Docker installed, you can spin it up in one command:

git clone https://github.com/logward-dev/logward.git
cd logward
docker compose up -d
Enter fullscreen mode Exit fullscreen mode

Visit http://localhost:3000 and you are ready to go.

Option 2: Cloud (Free Alpha)

If you don't want to touch Docker, I'm hosting a Free Cloud Instance during the Alpha phase. It's hosted in Europe 🇪🇺.

Sending your first log (Node.js)

We have SDKs for Node, Python, and PHP. Here is how simple it is in Node:

import { LogWardClient } from '@logward-dev/sdk-node';

const client = new LogWardClient({
  apiUrl: 'http://localhost:3000', // or https://api.logward.dev
  apiKey: 'lp_your_project_key'
});

// Send a log
client.info('payment-service', 'Transaction processed', { amount: 50 });

// It handles batching and retries automatically.
Enter fullscreen mode Exit fullscreen mode

Roadmap & Contributing

We are currently in Alpha (v0.2.0). The goal is to build a solid, community-driven alternative to the big enterprise players.

I'm looking for feedback specifically on:

  1. The Docker setup experience (did it work on your machine?).

  2. The Svelte 5 implementation (code reviews are welcome!).

  3. OpenTelemetry compatibility.

If you are a developer, a sysadmin, or just someone who hates paying for logs, give it a try!

Thanks for reading! Happy logging. 📝

Top comments (0)