A real-time anomaly detection system for HDFS logs using AI tools including Hugging Face, Chroma, and LangChain. The system includes a modern web interface built with React and Tailwind CSS.
docker compose up -d
cd backend
python -m venv venv
On mac/Linux :
source venv/bin/activate
On Windows :
source venv/scripts/activate
pip install -r requirements.txt
HUGGING_FACE_API_TOKEN=your_huggingface_api_key
docker-compose exec kafka kafka-topics --create --topic hadoop-logs --bootstrap-server kafka:9092 --partitions 1 --replication-factor 1
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
cd frontend
npm install
npm run dev
The frontend will be available at http://localhost:3000
The backend is built with FastAPI and uses:
The frontend is built with:
GET /health
: Health check endpointGET /anomalies/history
: Get historical anomaliesPOST /simulate-logs
: Simulate logs for testingWS /ws
: WebSocket endpoint for real-time updates