How karthih2/multiview-log-anomaly-detection works
LogSight is a batch log-anomaly detection and root-cause analysis application. A user uploads a log through the React UI; the FastAPI service runs the pipeline, stores the run and derived results, and serves report data back to the dashboard. The documented analysis spans cleaning and template parsing, three anomaly views, reliability-weighted fusion and thresholding, evidence and drift, then incident grouping and root-cause ranking. README documents the engine flow; sampled backend wiring confirms app routing and database initialization, but not every runtime call between pipeline stages.
Main entry points: parse.py Template mining · threshold.py Threshold and severity · client.ts API client · routes REST routes
Components 23
Dashboard
- Log upload
frontend/src/pages/UploadPage.tsx - API client
frontend/src/api/client.ts - Run reports
frontend/src/pages/report
API and runs
- API application
backend/app/main.py - REST routes
backend/app/api/routes - Run management
backend/app/services/runs.py - Pipeline runner
backend/app/pipeline/runner.py - Stage orchestration
backend/app/pipeline/stages.py - Result persistence
backend/app/services/persistence.py - Run database
backend/app/db/models.py
Detection pipeline
- Clean log lines
engine/ingest.py - Template mining
engine/parse.py - Semantic view
engine/detection/semantic_scoring.py - Structural view
engine/detection/structural_scoring.py - Temporal view
engine/detection/temporal_scoring.py - Reliability fusion
engine/detection/reliability.py - Threshold and severity
engine/detection/threshold.py
Evidence and RCA
- Drift detection
engine/detection/drift.py - Flag explanations
engine/evidence.py - Feature explanations
engine/explain.py - Incident grouping
engine/rca/incident_clustering.py - Root-cause ranking
engine/rca/rank_root_cause.py
Other components
- Log analyst
Connections 28
- Log analyst → Log upload: submits log
- Log upload → API client: sends upload
- API client → API application: calls API
- API application → REST routes: registers routes
backend/app/main.py - REST routes → Run management: manages runs
backend/app/api/routes/runs.py - Run management → Pipeline runner: starts pipeline
- Pipeline runner → Stage orchestration: runs stages
backend/app/pipeline/stages.py - Stage orchestration → Clean log lines: cleans logs
- Clean log lines → Template mining: feeds parsing
- Template mining → Semantic view: provides templates
- Template mining → Structural view: provides templates
- Template mining → Temporal view: provides sequence
- Semantic view → Reliability fusion: provides score
- Structural view → Reliability fusion: provides score
- Temporal view → Reliability fusion: provides score
- Reliability fusion → Threshold and severity: scores anomalies
- Threshold and severity → Flag explanations: flags lines
- Threshold and severity → Incident grouping: groups flags
- Threshold and severity → Drift detection: checks drift
- Flag explanations → Feature explanations: adds explanations
- Incident grouping → Root-cause ranking: ranks origins
- Stage orchestration → Result persistence: stores results
- Result persistence → Run database: writes records
backend/app/services/persistence.py - API application → Run database: initializes schema
backend/app/main.py - Run database → REST routes: serves report data
backend/app/api/routes/events.py - REST routes → API client: returns results
- API client → Run reports: supplies report data
- Run reports → Log analyst: shows findings