Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

100% open-source, self-hosted (cloud/on-premises) AIOps solution with local LLM based on Qwen2.5-coder

License

Notifications You must be signed in to change notification settings

Krigsexe/Ai-Ops

Repository files navigation

AIOps Platform

Open-source, self-hosted AI-powered IT Operations Management

License: MIT Python 3.11+ TypeScript

Overview

AIOps Platform is a comprehensive, 100% open-source solution for AI-powered IT operations management. It combines advanced AI capabilities with real-time monitoring and automated remediation to help operations teams detect, diagnose, and resolve incidents faster.

Key Features

  • AI-Powered Analysis: Local LLM (Ollama with Qwen 2.5) for anomaly detection, root cause analysis, and remediation suggestions
  • Real-time Monitoring: Time-series metrics storage with TimescaleDB and ClickHouse
  • Incident Management: Track and manage incidents with automated correlation
  • Playbook Automation: Create and execute automated remediation workflows
  • Alert Management: Smart alert deduplication and prioritization
  • 100% Self-hosted: No data leaves your infrastructure - airgap compatible

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                        Frontend (React)                          │
│              Dashboard │ Alerts │ Incidents │ Chat               │
└─────────────────────────────┬───────────────────────────────────┘
                              │
┌─────────────────────────────▼───────────────────────────────────┐
│                      Backend (FastAPI)                           │
│         REST API │ WebSocket │ AI Agents │ Task Queue            │
└──────────┬──────────────────┬──────────────────┬────────────────┘
           │                  │                  │
    ┌──────▼──────┐    ┌──────▼──────┐    ┌──────▼──────┐
    │  PostgreSQL │    │ TimescaleDB │    │  ClickHouse │
    │   (Main DB) │    │  (Metrics)  │    │ (Analytics) │
    └─────────────┘    └─────────────┘    └─────────────┘
           │
    ┌──────▼──────┐    ┌─────────────┐    ┌─────────────┐
    │    Redis    │    │    NATS     │    │   Ollama    │
    │   (Cache)   │    │ (Messaging) │    │    (LLM)    │
    └─────────────┘    └─────────────┘    └─────────────┘

Quick Start

Prerequisites

  • Docker 24+ with Compose V2
  • 8GB RAM minimum (16GB recommended)
  • 20GB disk space
  • NVIDIA GPU (optional, for faster LLM inference)

Installation

  1. Clone the repository

    git clone https://github.com/your-org/aiops-platform.git
    cd aiops-platform
  2. Run the setup script

    ./scripts/setup.sh
  3. Start the stack

    docker compose up -d
  4. Access the platform

Default credentials:

  • Username: admin
  • Password: admin123

Configuration

Environment Variables

Create a .env file in the project root:

# Security (CHANGE THESE IN PRODUCTION)
SECRET_KEY=your-super-secret-key-change-in-production
POSTGRES_PASSWORD=aiops_secure_2024
REDIS_PASSWORD=aiops_redis_2024

# Ollama
OLLAMA_MODEL=qwen2.5-coder:1.5b

# Environment
ENVIRONMENT=development
LOG_LEVEL=INFO

GPU Support

For NVIDIA GPU acceleration, ensure you have the NVIDIA Container Toolkit installed:

# Install NVIDIA Container Toolkit
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
  sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
  sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker

Project Structure

aiops-platform/
├── backend/              # FastAPI backend
│   ├── app/
│   │   ├── api/          # REST API routes
│   │   ├── agents/       # AI agents (LangChain)
│   │   ├── core/         # Config, database, security
│   │   ├── models/       # SQLAlchemy models
│   │   └── services/     # Business logic
│   └── tests/
├── frontend/             # React frontend
│   └── src/
│       ├── components/   # UI components
│       ├── pages/        # Route pages
│       ├── services/     # API clients
│       └── stores/       # State management
├── infrastructure/
│   ├── docker/           # Docker configs
│   └── kubernetes/       # Helm charts
├── docs/                 # Documentation
└── scripts/              # CLI tools

Development

Backend Development

cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements-dev.txt

# Run with hot reload
uvicorn app.main:app --reload --port 8000

Frontend Development

cd frontend
npm install

# Run dev server
npm run dev

Running Tests

# Backend tests
cd backend && pytest --cov=app

# Frontend tests
cd frontend && npm test

API Documentation

When running in development, API documentation is available at:

Key Endpoints

Endpoint Description
POST /api/v1/auth/login User authentication
GET /api/v1/alerts List alerts
GET /api/v1/incidents List incidents
POST /api/v1/agent/query Query AI assistant
GET /api/v1/metrics/query Query metrics

Security

Best Practices

  1. Change default passwords before deploying to production
  2. Use HTTPS with proper TLS certificates
  3. Enable network policies in Kubernetes
  4. Regularly update all dependencies
  5. Review audit logs for suspicious activity

Airgap Deployment

AIOps Platform is designed for airgap environments:

  • All dependencies are bundled
  • No external API calls
  • LLM runs locally via Ollama
  • No CDN dependencies in frontend

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests (pytest && npm test)
  5. Commit your changes (git commit -m 'feat: add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments


Made with passion by the AIOps community

About

100% open-source, self-hosted (cloud/on-premises) AIOps solution with local LLM based on Qwen2.5-coder

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •