| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
An AI-powered system for automated log analysis and incident resolution. Features a modern React frontend with a FastAPI backend, leveraging LLMs for root cause analysis and solution generation.
graph-rca/ ├── backend/ # Python FastAPI backend │ ├── app/ │ │ ├── api/ │ │ │ └── routes.py # API route handlers │ │ ├── core/ │ │ │ ├── database_handlers.py # MongoDB + ChromaDB clients │ │ │ ├── database_handlers_gpu.py # GPU-accelerated variant │ │ │ ├── embedding.py # Embedding utilities │ │ │ └── rag.py # RAG engine │ │ ├── models/ │ │ │ ├── context_data_models.py │ │ │ ├── graph_data_models.py │ │ │ ├── parsing_data_models.py │ │ │ └── rag_response_data_models.py │ │ └── utils/ │ │ ├── context_builder.py # DAG traversal & context extraction │ │ ├── database_healthcheck.py # Service health checks │ │ ├── graph_generator.py # DAG construction │ │ └── log_parser.py # LLM-based log parser │ ├── tests/ # Backend unit tests (5 files) │ ├── main.py # FastAPI application entry point │ └── requirements.txt # Python dependencies │ ├── frontend/ # React TypeScript frontend │ ├── src/ │ │ ├── components/ │ │ │ ├── AnalysisHistory.tsx │ │ │ ├── DocsUploadPanel.tsx │ │ │ ├── IncidentResolutionPanel.tsx │ │ │ ├── Layout.tsx │ │ │ ├── LogUploadPanel.tsx │ │ │ ├── StatusSidebar.tsx │ │ │ └── StepTabs.tsx │ │ ├── api.ts # API client │ │ ├── App.tsx # Main application │ │ ├── main.tsx # Entry point │ │ ├── store.ts # Zustand state (persisted to localStorage) │ │ └── styles.css │ └── package.json │ ├── experiments/ # 9 reproducible experiment scripts │ ├── 01_batch_inference/ │ ├── 02_scalability/ │ ├── 03_baseline_comparison/ │ ├── 04_doc_ablation/ │ ├── 05_noise_sensitivity/ │ ├── 06_parser_accuracy/ │ ├── 07_multi_judge_validation/ │ ├── 08_rag_real_world/ │ ├── 09_latency_profiling/ │ └── README.md │ ├── results/ # Raw JSON outputs from experiment runs ├── data/ │ ├── real_incidents/ # 200 annotated production incidents │ ├── chroma/ # ChromaDB persistence (auto-created) │ ├── db/ # MongoDB persistence (auto-created) │ └── ollama/ # Ollama model cache (auto-created) ├── docs/ # Sample documentation corpus │ ├── API.md │ ├── sample_documentation.txt │ ├── sample_log.log │ └── sample_log_2.log │ ├── .env.example # Environment variable template (copy to .env) ├── docker-compose.yaml # Docker services (MongoDB, ChromaDB, Ollama) ├── docker-compose.gpu.yaml # GPU-accelerated deployment variant ├── run.sh # One-command setup script ├── run-gpu-server.sh # Setup for remote GPU servers ├── run_all_experiments.py # Run all 9 experiments sequentially ├── check_prerequisites.py # Pre-flight dependency checker ├── start-backend.sh # Start FastAPI backend └── start-frontend.sh # Start Vite dev server
⚠️ Before first run: copy the environment template and fill in your values:
cp .env.example .env # Edit .env — at minimum set MONGO_URI and OLLAMA_HOST
git clone https://github.com/KTS-o7/graph-rca.git
cd graph-rca
./run.shThe script will:
After running ./run.sh, open two separate terminals:
Terminal 1 - Backend:
./start-backend.shTerminal 2 - Frontend:
./start-frontend.shThen open your browser to http://localhost:5173
| Service | URL | Description |
|---|---|---|
| Frontend | http://localhost:5173 | React UI |
| Backend API | http://localhost:8010 | FastAPI server |
| API Docs | http://localhost:8010/docs | Interactive API documentation |
| MongoDB | localhost:27017 | Document store |
| ChromaDB | localhost:8000 | Vector database |
| Ollama | localhost:11435 | LLM inference |
Analyse Log File
Add Documentation (Optional but recommended)
Generate Resolution
| Method | Endpoint | Description |
|---|---|---|
| GET | / | API information |
| GET | /api/health | Health check |
| POST | /api/log/analyse | Analyse uploaded log file (returns context + root cause) |
| POST | /api/docs/upload | Upload documentation files |
| POST | /api/incident/resolve | Generate incident resolution (requires context from /analyse) |
Full API docs: http://localhost:8010/docs
Create a .env file (copy from .env.example) and set the following variables before running:
| Variable | Required | Default | Description |
|---|---|---|---|
| MONGO_URI | Yes | mongodb://localhost:27017/ | MongoDB connection string. Use mongodb://admin:changeme@localhost:27017/ for the bundled Docker Compose setup. |
| OLLAMA_HOST | Yes | http://localhost:11435 | Ollama service URL. Port 11435 matches the Docker Compose host mapping. |
| ALLOWED_ORIGINS | No | http://localhost:5173,http://localhost:3000 | Comma-separated CORS origins. Override for production deployments. |
| OPENAI_API_KEY | For exp 07/08 | — | Required for multi-judge validation experiments with GPT-4o-mini. |
| GROQ_API_KEY | For exp 07/08 | — | Required for multi-judge validation experiments with Groq Llama-70B. |
cp .env.example .env
# Edit .env with your valuesTo reproduce all paper results:
# Run all 9 experiments sequentially
python run_all_experiments.py
# Or run a specific experiment
python experiments/01_batch_inference/run_experiment.py
python experiments/07_multi_judge_validation/run_experiment.py
# ... etcResults are saved as JSON in results/. Pre-computed outputs are already included for verification without re-execution.
Check running services:
docker-compose psView logs:
docker-compose logs <service-name>
# Examples:
docker-compose logs ollama
docker-compose logs chroma
docker-compose logs mongodbStop all services:
docker-compose downcd backend
source venv/bin/activate
python -m uvicorn main:app --reload --host 0.0.0.0 --port 8010cd frontend
npm run devcd backend
source venv/bin/activate
pytest tests/Frontend:
Backend:
Databases:
Experiment LLM Judges:
Backend won't start:
Frontend can't connect:
ALLOWED_ORIGINS=https://yourdomain.com ./start-backend.shGPU Support (Optional):
docker-compose -f docker-compose.yaml -f docker-compose.gpu.yaml up -dContributions are welcome! Please feel free to submit a Pull Request.
| Back | FazBrowse Home | New Git URL |