AI Setup & Integration
Transform your log analysis with artificial intelligence. Gonzo's AI integration brings natural language understanding, pattern recognition, and intelligent insights to log analysis, making complex debugging faster and more intuitive.
Quick Start: Set up your AI provider, then press i on any log entry to get instant AI analysis, or use m to switch between AI models on the fly.
AI Integration Overview
Gonzo supports multiple AI providers and models, giving you flexibility in cost, performance, and privacy:
OpenAI
Paid API
Local Ollama
Free
Local LM Studio
Free
Custom APIs
Varies
Core AI Features
Intelligent Log Analysis
Press i on any log entry for instant analysis:
Original Log:
{"timestamp":"2024-01-15T10:30:05Z","level":"error","service":"api-gateway","message":"Database connection timeout after 30s","user_id":"12345","endpoint":"/api/users","duration":30542}
AI Analysis:
"This error indicates a database connectivity issue affecting user 12345's request to the /api/users endpoint. The 30-second timeout suggests either:
1. Database server overload or unresponsiveness
2. Network connectivity issues between API gateway and database
3. Potential deadlock or long-running query
Recommended investigation steps:
- Check database server health and active connections
- Review recent database queries for performance issues
- Verify network connectivity between services
- Look for similar timeouts in the same timeframe to identify scope"AI-Powered Chat
Press c in log details for interactive analysis:
Contextual Understanding
AI analyzes logs within context:
Service relationships - Understands how microservices interact
Timing correlation - Connects events across time
Pattern significance - Explains why patterns matter
Business impact - Relates technical issues to user experience
Getting Started with AI
Quick Setup Path
OpenAI Setup
Step 1: Get Your API Key
Visit OpenAI API Platform
Create account or sign in
Navigate to API Keys (https://platform.openai.com/api-keys)
Create new secret key
Copy the key (starts with
sk-)
Important: Save your API key securely. OpenAI only shows it once, and you'll need it for Gonzo configuration.
Step 2: Configure Environment
Method 1: Environment Variable (Recommended)
Method 2: Session Variable
Method 3: Configuration File
Step 3: Test Your Setup
Step 4: Verify AI Features Work
Local AI Setup (Ollama)
Step 1: Install Ollama
Step 2: Start Ollama Service
Step 3: Download AI Models
Step 4: Configure Gonzo for Ollama
Step 5: Test Ollama Integration
Local LM Studio Setup
Step 1: Install LM Studio
Download LM Studio from https://lmstudio.ai/
Install the application for your operating system
Launch LM Studio
Step 2: Download Models
Open LM Studio
Go to "Discover" tab
Search and download recommended models:
microsoft/DialoGPT-medium(lightweight, good for testing)meta-llama/Llama-2-7b-chat-hf(balanced performance)meta-llama/Llama-2-13b-chat-hf(better quality, needs more RAM)
Step 3: Start Model Server
Go to "Local Server" tab in LM Studio
Select your downloaded model
Click "Start Server"
Note the server URL (usually
http://localhost:1234)
Step 4: Configure Gonzo for LM Studio
Step 5: Test LM Studio Integration
Custom API Setup
Enterprise AI Services
Azure OpenAI Service:
AWS Bedrock (via compatible proxy):
Custom OpenAI-Compatible API:
Testing Custom APIs
Real-World Examples
See AI features in action:
AI and a TUI: Practical Logging Tools for SREs - Practical AI use cases for incident response
AI Features Deep Dive
Model Auto-Selection
Gonzo intelligently selects the best available AI model:
OpenAI Priority:
Ollama Priority:
LM Studio:
Runtime Model Switching
Press m anywhere to switch models:
Benefits:
Cost optimization - Use expensive models only when needed
Performance tuning - Fast models for quick questions, powerful models for complex analysis
Experimentation - Compare responses from different models
Fallback options - Switch if one model is unavailable
AI Analysis Types
Single Log Entry Analysis:
Example Response:
Multi-Log Pattern Analysis:
Example Response:
Overall System Health Analysis:
Example Response:
AI Workflow Integration
Development Workflow
Production Monitoring
Incident Response
Troubleshooting AI Issues
Common Setup Problems
API Key Issues:
Model Availability:
What's Next?
Ready to set up AI integration? Continue with these detailed guides:
Setup & Configuration - Get your AI provider configured
AI Providers Guide - Detailed setup for each provider
Using AI Features - Master AI-powered workflows
Or explore how AI integrates with other advanced features:
Log Analysis - Combine AI with algorithmic analysis
Format Detection - Optimize data for AI processing
Last updated