MCP Logo

Auto-Remediation Monitoring & Control Platform

Real-time monitoring, AI diagnosis, automated recovery

🚀 Features

📦 Prerequisites

# Required Tools
- Docker Desktop 4.15+
- Python 3.9+
- Node.js 14.x (for App2)

🛠️ Installation

git clone https://github.com/VikasDz/DevOps-Monitoring-MCP.git
cd DevOps-Monitoring-MCP
cp .env.example .env
nano .env  # Add your DeepSeek API key
docker-compose up -d --build

🌐 Service Endpoints

ServiceURLCredentials
Grafanahttp://localhost:3000admin:grafana
Prometheushttp://localhost:9090-
Kibanahttp://localhost:5601-
MCP Dashboardhttp://localhost:8000-

🐳 Docker Commands Cheatsheet

docker-compose ps
docker-compose logs -f mcp
docker-compose up -d --force-recreate
docker-compose down -v && docker system prune -a

📝 Sample prometheus.yml

global:
  scrape_interval: 15s

scrape_configs:
  - job_name: 'app1'
    metrics_path: '/metrics'
    static_configs:
      - targets: ['app1:5000']
  
  - job_name: 'app2'
    metrics_path: '/metrics'
    static_configs:
      - targets: ['app2:3000']

🤖 Testing Auto-Remediation

import requests
for _ in range(5):
    requests.get('http://localhost:5000/error')

docker-compose logs mcp | grep "Attempting remediation"

🗂️ Project Structure

ARM-CP/
├── apps/
│   ├── app1/               # Flask app
│   └── app2/               # Node.js app
├── monitoring/
│   ├── prometheus.yml
│   ├── grafana/
│   └── logstash/
├── mcp-server/             # Control plane
└── docker-compose.yml

💡 How the AI Integration Works

def analyze_incident(self, error_log):
    prompt = f"""
    Analyze this Docker container error:
    {error_log}
    
    Suggest remediation steps in JSON format with:
    - root_cause
    - steps[]
    - confidence_score
    """
    
    response = requests.post(
        self.deepseek_url,
        headers={"Authorization": f"Bearer {self.api_key}"},
        json={"model": "deepseek-chat", "messages": [{"role": "user", "content": prompt}]}
    )
    return response.json()

🆘 Support

  1. Check container logs:
    docker-compose logs --tail=100
  2. Open a GitHub Issue
  3. Include your docker-compose version output