An intelligent log analysis tool that uses LLMs to provide deep insights into system logs.
- AI-powered log analysis using OpenAI's GPT models
- Identification of issues, patterns, and anomalies
- Root cause analysis and remediation suggestions
- Real-time visualization of log patterns
- Support for various log formats
- Clone the repository:
git clone https://github.com/yourusername/log-insight.git
cd log-insight
- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Copy
.env.example
to.env
and add your OpenAI API key:
cp .env.example .env
# Edit .env and add: OPENAI_API_KEY=your_key_here
Basic usage:
from src.analyzers.llm import LLMAnalyzer
from src.data.log_parser import LogParser
# Initialize components
parser = LogParser(chunk_size=10)
analyzer = LLMAnalyzer(api_key="your-api-key")
# Analyze logs
for log_chunk in parser.parse_file("path/to/logs.txt"):
analysis = analyzer.analyze_chunk(log_chunk)
print(analysis)
log-insight/
├── src/
│ ├── analyzers/ # Log analysis implementations
│ ├── visualization/ # Data visualization
│ ├── data/ # Log parsing and data handling
│ └── utils/ # Helper utilities
└── tests/ # Test cases
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.