Skip to content

aaf091/logFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logflow

A high-performance log aggregation pipeline built with Rust and Go.

[Rust Agent] → gRPC/protobuf → [Go Server] → SQLite → [Web Dashboard]

Architecture

Component Language Role
agent Rust Tails log files, parses JSON/plaintext, ships via gRPC
server Go Receives logs, persists to SQLite, serves REST API + dashboard

Features

  • Rust agent tails files in real-time with low memory footprint
  • Batched gRPC transport with automatic retry and backoff
  • JSON and plaintext log parsing with level detection
  • SQLite persistence with indexed queries
  • REST API with filtering by level, host, and keyword
  • Real-time web dashboard with live polling

Quick Start

Run locally:

# Terminal 1 - Start server
cd server && go run cmd/server/main.go

# Terminal 2 - Start agent
cd agent && cargo run

# Terminal 3 - Send test logs
echo "ERROR something failed" >> /tmp/logflow-test.log
echo '{"level":"info","message":"user logged in"}' >> /tmp/logflow-test.log

Open http://localhost:8080 for the dashboard.

Run with Docker:

docker-compose up --build

API

Endpoint Method Description
/logs GET Query logs
/logs?level=ERROR GET Filter by level
/logs?keyword=db GET Search by keyword
/logs?host=web-01 GET Filter by host
/health GET Health check

Tech Stack

  • Rust: tokio, tonic, prost, serde
  • Go: net/grpc, modernc/sqlite, net/http
  • Transport: gRPC + Protocol Buffers
  • Storage: SQLite

About

A high-performance log aggregation pipeline built with Rust and Go.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors