AI-Powered Log Analysis
for Microservices
Stream, analyze, and debug logs in real-time. Centralized visibility powered by Kafka, Elasticsearch, and AI — set up in under 5 minutes.
Built in the open. Owned by you.
Apache Licensed
Use it, modify it, ship it. No strings attached.
Self-Hostable
One Docker command. Runs on your infra.
Fully Customizable
Swap components, extend pipelines, fork freely.
Everything you need for log observability
From ingestion to AI-powered root cause analysis — LogSpectra closes the full loop.
AI Root Cause Detection
Automatically surfaces anomalies and suggests fixes using LLM-based analysis.
Real-Time Log Streaming
Logs flow instantly via Kafka — no polling, no lag, true streaming.
Kafka + Elasticsearch Pipeline
Battle-tested data pipeline. Scalable, fault-tolerant, production-ready.
Zero-Code SDK Integration
Add one Maven dependency and one YAML block. Nothing else required.
Simple pipeline. Powerful outcomes.
From zero to monitoring in minutes.
Download Setup
version: '3.8'
services:
postgres:
image: postgres:15
environment:
POSTGRES_DB: ${POSTGRES_DB:-logspectra}
POSTGRES_USER: ${POSTGRES_USER:-logspectra}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-logspectra}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
zookeeper:
image: confluentinc/cp-zookeeper:7.4.0
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
image: confluentinc/cp-kafka:7.4.0
depends_on:
- zookeeper
ports:
- "${KAFKA_HOST_PORT:-9092}:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:${KAFKA_HOST_PORT:-9092}
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.11.0
environment:
- discovery.type=single-node
- xpack.security.enabled=false
ports:
- "9200:9200"
volumes:
- es_data:/usr/share/elasticsearch/data
logspectra:
image: ghcr.io/kmvipin/logspectra:latest
depends_on:
- postgres
- kafka
- elasticsearch
ports:
- "${APP_HOST_PORT:-8080}:8080"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/${POSTGRES_DB:-logspectra}
SPRING_DATASOURCE_USERNAME: ${POSTGRES_USER:-logspectra}
SPRING_DATASOURCE_PASSWORD: ${POSTGRES_PASSWORD:-logspectra}
KAFKA_BOOTSTRAP_SERVERS: kafka:9092
ELASTICSEARCH_HOST: elasticsearch
ELASTICSEARCH_PORT: 9200
volumes:
postgres_data:
es_data:Run the System
docker-compose up -dAccess the UI
adminadminCreate a Project
In the LogSpectra UI, create a new project. Each project groups logs from one or more services.
New Project
After creation, copy your Project ID — you'll need it in the next step.
Configure SDK
Add this configuration to your application.yml:
logspectra:
enabled: true
service-name: gateway-service
project-id: YOUR_PROJECT_ID
kafka:
enabled: true
bootstrap-servers: localhost:9092
topic: service-logsAdd Maven Dependency
<dependency>
<groupId>com.github.kmvipin</groupId>
<artifactId>logspectra-starter</artifactId>
<version>v1.0.1</version>
</dependency>The starter auto-configures log interception. No additional code required — just the dependency and YAML above.
View Logs
Your logs are now flowing into LogSpectra.
- Open the dashboard → select your project → watch logs arrive in real-time.
- Use the AI Analysis tab to automatically detect anomalies and get root cause suggestions.
AI-powered root cause analysis, built in.
Connect any AI provider, click Analyze, and let LogSpectra diagnose your logs automatically — root cause, explanation, and a suggested fix, streamed directly to your dashboard.
When you click Analyze on any log group in the UI, LogSpectra's backend collects the relevant log entries from Elasticsearch, assembles them into a structured prompt, and sends them to your configured AI provider. The response streams back in real-time — surfacing the root cause, a plain-English explanation, and an actionable fix suggestion.
Choose your AI provider
Ollama
Run AI models entirely on your own machine. No API key, no data leaves your network. Best for development and privacy-sensitive environments.
ollama pull qwen3.5:cloudAI_PROVIDER=ollama
AI_OLLAMA_HOST=host.docker.internal
AI_OLLAMA_PORT=11434Use host.docker.internal so the Docker container can reach Ollama running on your host machine.
Recommended models: qwen3.5:cloud, mistral, gemma2
OpenAI
Use GPT-4o or GPT-3.5-turbo for high-quality log analysis. Requires an OpenAI API key. Fastest setup with no local dependencies.
AI_PROVIDER=openai
AI_OPENAI_API_KEY=your_api_key_hereGet your API key from platform.openai.com.
Recommended models: gpt-4o, gpt-4-turbo, gpt-3.5-turbo
Claude
Use Anthropic's Claude models for nuanced, context-aware log analysis. Excellent at reasoning through complex distributed system failures.
AI_PROVIDER=claude
AI_CLAUDE_API_KEY=your_api_key_hereGet your API key from console.anthropic.com.
Recommended models: claude-opus-4-5, claude-sonnet-4-5
Apply configuration to your deployment
These env vars are added to the existing docker-compose.yml setup from the Quick Start section — no need to rebuild.
# Add to your existing .env file
# Choose one provider:
AI_PROVIDER=ollama
AI_OLLAMA_HOST=host.docker.internal
AI_OLLAMA_PORT=11434
# --- OR ---
AI_PROVIDER=openai
AI_OPENAI_API_KEY=your_api_key_here
# --- OR ---
AI_PROVIDER=claude
AI_CLAUDE_API_KEY=your_api_key_hereThen run:
docker-compose up -dConfigure your provider in the UI
Open Settings
Click the gear icon in the top-right of the LogSpectra dashboard
Select Provider
Choose Ollama, OpenAI, or Claude from the provider dropdown
Select Model
Pick a model compatible with your provider (e.g. qwen3.5:cloud, gpt-4o)
Save Settings
Click Save. LogSpectra is now ready to analyze logs with AI.
How analysis works, step by step
Navigate to Logs
Go to your project in the dashboard. Select the service and time range you want to investigate.
Click "Analyze"
Click the Analyze button on a log group or error cluster. LogSpectra selects the most relevant log entries automatically.
Backend Assembles Context
The backend retrieves logs from Elasticsearch, structures them into a diagnostic prompt, and sends it to your configured AI provider.
AI Response Streams In
The AI response appears in a panel below the logs — streaming token by token. You'll see three sections appear progressively:
Take Action
Copy the fix, share the analysis with your team, or dismiss and continue investigating.
NullPointerException in OrderController.java:142 caused by a missing user session during token refresh.
The gateway service attempted to refresh an OAuth token before the session object was fully initialized. This race condition appears under high concurrency (>200 RPS).
Add a null check before calling session.getUser() in OrderController.java:142. Consider using Optional<User> and returning 401 early if the session is absent.
Built for teams who can't afford blind spots.
Cut Debugging Time
Stop grep-ing through files. Find the root cause in seconds, not hours.
Centralized Observability
One dashboard for all your services. No more switching between log files.
AI-Powered Insights
Not just logs — understanding. Click Analyze on any log group and get root cause, explanation, and a fix suggestion — powered by Ollama, OpenAI, or Claude.
Zero-Code Integration
One dependency. One YAML block. Works with any Spring Boot service instantly.
Start monitoring your logs in minutes.
Free forever. No account needed. Runs entirely on your infrastructure.