Analyze error logs and stack traces privately using local AI
A simple Streamlit app that helps DevOps engineers analyze production logs without sending sensitive data to external APIs. Everything runs locally using Ollama.
Problem: DevOps engineers can't paste production logs into ChatGPT due to security/compliance concerns.
Solution: Run AI analysis completely locally with Ollama. Your logs never leave your machine.
- π 100% Private - No external API calls, all data stays local
- π Fast Analysis - Powered by llama3.2 (3B model)
- π Multiple Analysis Types - Quick, detailed, or solution-focused
- πΎ Export Results - Download analysis reports
- π Built-in Examples - Try with sample logs
- π¨ Clean UI - Simple Streamlit interface
Download and install from: https://ollama.com/
Available for macOS, Linux, and Windows. Just download the installer for your OS and run it.
Verify installation:
# Check if Ollama is installed
ollama --version
# You should see something like: ollama version 0.x.xollama pull llama3.2Confirm the model is ready:
# List installed models
ollama list
# You should see llama3.2 in the list# Create virtual environment (keeps dependencies isolated)
python3 -m venv venv
# Activate it
source venv/bin/activate # macOS/Linux
# OR
venv\Scripts\activate # Windows
# Install dependencies from requirements.txt
pip install -r requirements.txtWhy virtual environment?
- Keeps project dependencies isolated
- Prevents version conflicts with other projects
- Easy to recreate on different machines
ollama serve# Check if Ollama server is running
ollama ps
# If it shows an empty list or models, you're good!streamlit run app.py- Open browser to
http://localhost:8501 - Paste your error log or stack trace
- Select analysis type (Quick/Detailed/Solutions/All)
- Click "Analyze"
- Get instant insights!
psycopg2.OperationalError: could not connect to server: Connection refused
Is the server running on host "localhost" and accepting connections on port 5432?
Pod web-app-7d8c9f-xyz in namespace production is in CrashLoopBackOff
Error: failed to start container: executable file not found in $PATH
MemoryError: Unable to allocate 8.5 GiB for an array
npm ERR! network request to https://registry.npmjs.org/express failed
The command '/bin/sh -c npm install' returned a non-zero code: 1
βββββββββββββββββββ
β Your Machine β (Everything runs locally)
βββββββββββββββββββ€
β Streamlit UI β β You paste logs here
β β β
β Ollama Server β β AI analyzes locally
β (llama3.2) β
βββββββββββββββββββ
β No OpenAI
β No Claude API
β No external services
β
100% Private
| Component | Technology | Purpose |
|---|---|---|
| UI | Streamlit | Web interface |
| AI Runtime | Ollama | Local LLM server |
| Model | llama3.2 (3B) | Log analysis |
| Language | Python 3.9+ | App logic |
-
Quick Analysis
- Error type identification
- Severity assessment
- One-line summary
-
Detailed Root Cause
- What went wrong
- Why it happened
- Component failure analysis
-
Solution Suggestions
- Immediate fixes
- Configuration changes
- Prevention strategies
-
Comprehensive (All)
- Everything above
- Related documentation
- Best practices
-
Ollama runs on localhost:11434
- No outbound connections
- All inference happens on your CPU/GPU
-
Streamlit runs on localhost:8501
- No data uploaded to Streamlit Cloud
- Runs completely offline
-
Test Privacy Yourself
Simple 3-step test:
- Start the app:
streamlit run app.py - Turn off your WiFi or unplug your ethernet cable
- Paste a log and click "Analyze"
It still works! π
Try opening ChatGPT with WiFi off - it won't work. But this analyzer keeps running because everything is 100% local.
- Start the app:
- OS: macOS, Linux, or Windows
- Python: 3.9 or higher
- RAM: 8GB minimum (16GB recommended)
- Disk: 5GB for model storage
- Internet: Only for initial setup (download Ollama & model)
This is a demo project for learning LLMOps (Large Language Model Operations).
Perfect for:
- DevOps engineers learning AI
- Building privacy-first tools
- Understanding local LLM deployment
- Writing blog posts about LLMOps
- Medium Blog Post - Complete tutorial
- Ollama Documentation
- Streamlit Docs
- llama3.2 Model Card
-
Use GPU acceleration (if available)
# Check GPU support ollama run llama3.2 --verbose -
Adjust model size based on your hardware
llama3.2:1b- Faster, less accurate (2GB RAM)llama3.2- Balanced (8GB RAM)llama3.2:7b- Slower, more accurate (16GB RAM)
-
Analyze logs in batches for better efficiency
# Check if Ollama is running
curl http://localhost:11434/api/version
# If not, start it
ollama serve# List installed models
ollama list
# Pull llama3.2 if missing
ollama pull llama3.2- Use a smaller model:
ollama pull llama3.2:1b - Check system resources:
htoporActivity Monitor - Enable GPU acceleration (NVIDIA/AMD)
MIT License - Feel free to use, modify, and share!
Check out the Medium article explaining how this was built:
A 3-minute guide covering:
- Why local AI matters for DevOps
- How Ollama provides privacy-first analysis
- Building UIs with Streamlit (no JavaScript!)
- Complete code walkthrough
If you found this helpful, give it a star! β
Built with β€οΈ for the DevOps community
Remember: Your logs are sensitive. This tool ensures they stay private.