LogRadarAI v2.2.3

Collect, analyze, and alert on logs from Linux servers and Docker containers — powered by local AI (Ollama) and delivered via Telegram.

LogRadarAI focuses on recent logs for real-time analysis and alerting — it is not designed as a permanent log archive.

Python 3.9+ Flask 2.x Vue.js 3 License GPL-3.0 Docker Pulls GHCR Available
🐳 Docker Hub ⭐ GitHub 🚀 Quick Start

Features

📊

Real-time Dashboard

Monitor log statistics, system health, and alert status at a glance with an interactive dashboard.

📝

Multi-source Collection

Collect logs from rsyslog (UDP/TCP) and Docker containers in a unified interface.

🤖

Local AI Analysis

Analyze logs using Ollama LLMs for intelligent insights, pattern detection, and automated troubleshooting.

🔔

Smart Alerts

Create custom filters to detect patterns and receive instant Telegram notifications.

🐳

Docker Integration

Auto-discover and monitor Docker container logs with per-container AI analysis.

💬

AI Chat Assistant

Ask questions about your logs in natural language and get AI-powered troubleshooting guidance.

🎨

Modern UI

Clean, responsive interface inspired by oVirt/Foreman. Offline-capable — no CDN required.

Screenshots

LogRadarAI features a modern, responsive interface with both light and dark themes.

Dashboard — Light Theme
Dashboard — Light Theme
AI Analyzer — Dark Theme
AI Analyzer — Dark Theme

Architecture

LogRadarAI collects logs from multiple sources, processes them through a central monitor, and leverages local AI for intelligent analysis.

┌─────────────────┐ ┌─────────────────┐ │ Linux Servers │───▶│ Syslog UDP │ │ (rsyslog) │ │ Port 5514 │ └─────────────────┘ └────────┬────────┘ │ ┌─────────────────┐ ┌────────▼────────┐ ┌─────────────────┐ │ Docker │───▶│ LogAI │───▶│ Redis │ │ Containers │ │ Monitor │ │ (Storage) │ └─────────────────┘ └────────┬────────┘ └─────────────────┘ │ ┌────────▼────────┐ ┌─────────────────┐ │ Ollama AI │───▶│ Telegram │ │ (Analysis) │ │ (Alerts) │ └─────────────────┘ └─────────────────┘

Quick Start

🐳 Docker Compose (Recommended)

git clone https://github.com/ftsiadimos/logaimonitor.git
cd logaimonitor
cp docker-compose.example.yml docker-compose.yml
# Edit docker-compose.yml — set SECRET_KEY, OLLAMA_HOST,
# TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID (or configure via the web UI later)
docker compose up -d
⚠️ Default Credentials: username admin / password admin
Change these immediately after first login.

Open http://localhost:5059.

📦 Manual Installation

pip install -r requirements.txt

# Start Redis
docker run -d --name redis -p 6379:6379 redis:7-alpine

# Install Ollama and pull a model
curl -fsSL https://ollama.ai/install.sh | sh
ollama pull llama3.2
ollama serve

# Run the app
python app.py

Configuration

Environment variables can be set in docker-compose.yml or changed later via the web UI (Settings).

VariableDescriptionDefault
SECRET_KEYFlask secret keychange-this
REDIS_HOSTRedis hostnamelocalhost
REDIS_PORTRedis port6379
OLLAMA_HOSTOllama API URLhttp://localhost:11434
OLLAMA_MODELOllama model namellama3.2
TELEGRAM_BOT_TOKENTelegram bot token—
TELEGRAM_CHAT_IDTelegram chat ID—
LOG_RETENTION_HOURSRecent log retention (not a full history)2
ANALYSIS_INTERVAL_SECONDSAuto-analysis interval300

Rsyslog Configuration

On each Linux server create /etc/rsyslog.d/99-logaimonitor.conf:

# Forward all logs via UDP
*.* @logaimonitor-host:5514

# Or via TCP (more reliable)
*.* @@logaimonitor-host:5515
sudo systemctl restart rsyslog

Forward Specific Logs Only

# Auth / security only
auth,authpriv.* @logaimonitor-host:5514

# Errors and above
*.err @logaimonitor-host:5514

# Kernel messages
kern.* @logaimonitor-host:5514

Test with logger

logger -n logaimonitor-host -P 5514 -d "Test message from server"

Docker Logs from External Hosts

Option 1 — Docker Syslog Logging Driver (Recommended)

docker run -d \
  --log-driver=syslog \
  --log-opt syslog-address=udp://logaimonitor-host:5514 \
  --log-opt tag="{{.Name}}" \
  your-image

Or set as default in /etc/docker/daemon.json:

{
  "log-driver": "syslog",
  "log-opts": {
    "syslog-address": "udp://logaimonitor-host:5514",
    "tag": "{{.Name}}"
  }
}
sudo systemctl restart docker

Option 2 — Docker Remote API

Edit /etc/docker/daemon.json on the remote host:

{ "hosts": ["unix:///var/run/docker.sock", "tcp://0.0.0.0:2375"] }

Then set DOCKER_SOCKET=tcp://remote-host:2375 on LogAI Monitor.

⚠️ This exposes Docker without authentication. Use TLS certificates in production.

Option 3 — rsyslog on Remote Host

# /etc/rsyslog.d/99-docker-forward.conf
module(load="imjournal")
:programname, startswith, "docker" @logaimonitor-host:5514

Telegram Notifications

Set up Telegram alerts in four simple steps:

  1. Create a bot with @BotFather and copy the bot token.
  2. Send a message to your bot.
  3. Get your chat ID from https://api.telegram.org/bot<TOKEN>/getUpdates.
  4. Set TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID via environment variables or the Settings page.

Usage

Creating Filters

  1. Go to Filters in the sidebar and click Create Filter.
  2. Configure conditions: Severity, Source Contains, Message Contains, or Message Regex.
  3. Enable Telegram notification if desired, then save.

AI Analysis

  1. Go to AI Analysis and click Analyze Recent Logs for a batch analysis.
  2. Use the Chat Assistant to ask questions about your logs.
  3. Click any log entry → Analyze with AI for a detailed breakdown.

Docker Containers

Go to Docker Containers in the sidebar to view all running containers, browse their logs, and trigger AI analysis per container.

API Reference

LogRadarAI exposes a RESTful API for programmatic access. All endpoints require authentication.

MethodEndpointDescription
GET/api/logsGet logs with filtering
GET/api/logs/<id>Get single log
POST/api/logs/ingestIngest log via HTTP
GET/api/filtersList all filters
POST/api/filtersCreate filter
PUT/api/filters/<id>Update filter
DELETE/api/filters/<id>Delete filter
GET/api/alertsList alerts
POST/api/alerts/<id>/acknowledgeAcknowledge alert
GET/api/ollama/statusCheck Ollama status
POST/api/ollama/analyzeAnalyze logs
POST/api/ollama/chatChat with AI
GET/api/settingsGet settings
POST/api/settingsSave settings
POST/api/telegram/testTest Telegram connection

Ports

PortProtocolDescription
5059TCPWeb interface
5514UDPSyslog (UDP)
5515TCPSyslog (TCP)

Tech Stack

🐍 Python · Flask · Flask-SocketIO 🔴 Redis 🤖 Ollama (local LLM) 💬 Telegram Bot API 💚 Vue.js 3 🐳 Docker · Docker Compose

Troubleshooting

📋 Logs not appearing

🤖 Ollama not working

💬 Telegram not sending messages