Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LogLens

Turn messy server logs into structured incident reports in seconds.

Live Demo Python React

Production logs are the source of truth during outages, but a 50k-line dump is unreadable under pressure. LogLens parses common log formats, detects anomalies, clusters errors, builds a timeline, ranks likely root causes, and outputs Markdown + JSON you can paste into Jira or PagerDuty.


Highlights

  • Deterministic core: z-score anomalies, silence gaps, cascade windows, DBSCAN error clustering
  • One optional LLM call: Groq narrative polish; full template fallback without API key
  • Multi-format parsing: Nginx, Python logging, Docker, Kubernetes, systemd, and generic fallback
  • Incident report: severity, clusters, timeline, ranked root-cause hypotheses
  • Observability-ready: optional Phoenix / OpenTelemetry export

Pipeline

Log input → auto parser → anomaly detection → error clustering → timeline → root cause → report (Markdown + JSON)

Supported log formats

Format Example
Nginx access log lines with status codes
Python / uvicorn INFO: ... "GET / HTTP/1.1" 200
Python logging 2024-01-15 ERROR module: message
Docker container stderr/stdout timestamps
Kubernetes pod events and warnings
systemd journal-style service lines

Unknown lines fall back to a generic timestamp/keyword parser.


Tech stack

Layer Tools
Backend Python, FastAPI, uv
Analysis NumPy/Pandas-style pipeline, embeddings + DBSCAN clustering
LLM (optional) Groq via LangChain LCEL
Frontend React, Vite, Tailwind, Recharts
Observability Arize Phoenix (optional)

Quick start

Backend

git clone https://github.com/Znaxh/Loglens.git
cd Loglens/backend
cp .env.example .env   # optional GROQ_API_KEY for narrative prose
uv sync --all-groups
SKIP_PHOENIX=true uv run uvicorn main:app --reload --host 0.0.0.0 --port 8000

Frontend

cd ../frontend
npm install
npm run dev

Set VITE_API_URL if the API is not on http://localhost:8000.

Without Groq

Leave GROQ_API_KEY empty. The full deterministic pipeline still runs and a complete template report is generated.


Docker

cd backend
docker compose up --build

API: http://localhost:8000 · Phoenix UI (optional): http://localhost:6006


Tests & evals

cd backend
SKIP_PHOENIX=1 uv run pytest tests/ -v
SKIP_PHOENIX=true uv run python -m evals.eval_pipeline

Project structure

Loglens/
├── backend/     # FastAPI, parsers, analysis, report generation, evals
└── frontend/    # Vite + React dashboard

Live demo

https://logl.netlify.app/


Author

Anurag Pratap Singh · GitHub

License

See repository license terms.

About

Turn messy server logs into structured incident reports in seconds

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages