A high-performance log aggregation pipeline built with Rust and Go.
[Rust Agent] → gRPC/protobuf → [Go Server] → SQLite → [Web Dashboard]
| 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 |
- 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
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.logOpen http://localhost:8080 for the dashboard.
Run with Docker:
docker-compose up --build| 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 |
- Rust: tokio, tonic, prost, serde
- Go: net/grpc, modernc/sqlite, net/http
- Transport: gRPC + Protocol Buffers
- Storage: SQLite