Initial commit: LLM Automation Docs & Remediation Engine v2.0
Features: - Automated datacenter documentation generation - MCP integration for device connectivity - Auto-remediation engine with safety checks - Multi-factor reliability scoring (0-100%) - Human feedback learning loop - Pattern recognition and continuous improvement - Agentic chat support with AI - API for ticket resolution - Frontend React with Material-UI - CI/CD pipelines (GitLab + Gitea) - Docker & Kubernetes deployment - Complete documentation and guides v2.0 Highlights: - Auto-remediation with write operations (disabled by default) - Reliability calculator with 4-factor scoring - Human feedback system for continuous learning - Pattern-based progressive automation - Approval workflow for critical actions - Full audit trail and rollback capability
This commit is contained in:
50
docs/api/endpoints.md
Normal file
50
docs/api/endpoints.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# API Endpoints Reference
|
||||
|
||||
## Complete Endpoint List
|
||||
|
||||
| Method | Endpoint | Description | Auth |
|
||||
|--------|----------|-------------|------|
|
||||
| GET | `/api/v1/sections` | List all sections | No |
|
||||
| GET | `/api/v1/sections/{id}` | Get section content | No |
|
||||
| GET | `/api/v1/summary` | Get sections summary | No |
|
||||
| GET | `/api/v1/search` | Search documentation | No |
|
||||
| GET | `/api/v1/stats` | Get statistics | No |
|
||||
| GET | `/api/v1/llm-optimized/{id}` | Get LLM-optimized content | No |
|
||||
| GET | `/health` | Health check | No |
|
||||
| GET | `/mcp/methods` | List MCP methods | Yes |
|
||||
| GET | `/mcp/connections` | List connections | Yes |
|
||||
| POST | `/mcp/execute/ssh` | Execute SSH command | Yes |
|
||||
| POST | `/mcp/execute/snmp/get` | SNMP GET query | Yes |
|
||||
| POST | `/mcp/execute/api` | API request | Yes |
|
||||
|
||||
## Response Formats
|
||||
|
||||
All API responses follow this structure:
|
||||
|
||||
### Success Response
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"data": { ... },
|
||||
"timestamp": "2025-01-20T10:30:00Z"
|
||||
}
|
||||
```
|
||||
|
||||
### Error Response
|
||||
```json
|
||||
{
|
||||
"success": false,
|
||||
"error": "Error message",
|
||||
"code": "ERROR_CODE",
|
||||
"timestamp": "2025-01-20T10:30:00Z"
|
||||
}
|
||||
```
|
||||
|
||||
## HTTP Status Codes
|
||||
|
||||
- `200` - Success
|
||||
- `400` - Bad Request
|
||||
- `401` - Unauthorized
|
||||
- `404` - Not Found
|
||||
- `429` - Too Many Requests
|
||||
- `500` - Internal Server Error
|
||||
135
docs/api/index.md
Normal file
135
docs/api/index.md
Normal file
@@ -0,0 +1,135 @@
|
||||
# API Documentation
|
||||
|
||||
La documentazione datacenter è accessibile tramite API REST ottimizzata per umani e LLM.
|
||||
|
||||
## Base URL
|
||||
|
||||
```
|
||||
https://docs.datacenter.local/api/v1
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
Attualmente l'API è accessibile senza autenticazione nella rete interna.
|
||||
Per accesso esterno è richiesta autenticazione API key.
|
||||
|
||||
## Endpoints
|
||||
|
||||
### GET /sections
|
||||
|
||||
Lista tutte le sezioni disponibili con metadata.
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": "01_infrastruttura_fisica",
|
||||
"title": "Infrastruttura Fisica",
|
||||
"section": "01",
|
||||
"last_updated": "2025-01-20T10:30:00Z",
|
||||
"size_bytes": 45000,
|
||||
"token_estimate": 11250,
|
||||
"url": "/docs/sections/01_infrastruttura_fisica/",
|
||||
"api_url": "/api/v1/sections/01_infrastruttura_fisica"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### GET /sections/{section_id}
|
||||
|
||||
Ottieni contenuto completo di una sezione.
|
||||
|
||||
**Parameters:**
|
||||
- `format` (query): `markdown` | `html` | `json` (default: `markdown`)
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
curl https://docs.datacenter.local/api/v1/sections/02_networking?format=markdown
|
||||
```
|
||||
|
||||
### GET /summary
|
||||
|
||||
Summary ottimizzato per LLM con key points di ogni sezione.
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
[
|
||||
{
|
||||
"section_id": "01_infrastruttura_fisica",
|
||||
"title": "Infrastruttura Fisica",
|
||||
"key_points": [
|
||||
"Informazioni Generali Datacenter",
|
||||
"Layout e Organizzazione",
|
||||
"Sistema Elettrico"
|
||||
],
|
||||
"subsections": ["1.1", "1.2", "2.1", ...],
|
||||
"last_updated": "2025-01-20T10:30:00Z"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### GET /search
|
||||
|
||||
Ricerca full-text nella documentazione.
|
||||
|
||||
**Parameters:**
|
||||
- `q` (query, required): Search query
|
||||
- `limit` (query): Max results (default: 10, max: 50)
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
curl "https://docs.datacenter.local/api/v1/search?q=ups&limit=5"
|
||||
```
|
||||
|
||||
### GET /stats
|
||||
|
||||
Statistiche generali della documentazione.
|
||||
|
||||
### GET /llm-optimized/{section_id}
|
||||
|
||||
Contenuto ottimizzato specificamente per consumo LLM.
|
||||
|
||||
**Features:**
|
||||
- Markdown pulito
|
||||
- Metadata espliciti
|
||||
- Istruzioni per LLM
|
||||
- Token count
|
||||
|
||||
## Rate Limiting
|
||||
|
||||
- API pubblica: 100 req/min
|
||||
- Con API key: 1000 req/min
|
||||
|
||||
## Esempi d'uso
|
||||
|
||||
### Python
|
||||
```python
|
||||
import requests
|
||||
|
||||
# Get all sections
|
||||
response = requests.get('https://docs.datacenter.local/api/v1/sections')
|
||||
sections = response.json()
|
||||
|
||||
# Get specific section
|
||||
response = requests.get(
|
||||
'https://docs.datacenter.local/api/v1/sections/02_networking',
|
||||
params={'format': 'markdown'}
|
||||
)
|
||||
content = response.json()
|
||||
|
||||
print(f"Section: {content['metadata']['title']}")
|
||||
print(f"Tokens: {content['metadata']['token_estimate']}")
|
||||
print(content['content'])
|
||||
```
|
||||
|
||||
### cURL
|
||||
```bash
|
||||
# Get summary
|
||||
curl https://docs.datacenter.local/api/v1/summary | jq
|
||||
|
||||
# Search
|
||||
curl "https://docs.datacenter.local/api/v1/search?q=vmware&limit=10" | jq
|
||||
|
||||
# Get stats
|
||||
curl https://docs.datacenter.local/api/v1/stats | jq
|
||||
```
|
||||
93
docs/api/mcp.md
Normal file
93
docs/api/mcp.md
Normal file
@@ -0,0 +1,93 @@
|
||||
# MCP Server Documentation
|
||||
|
||||
Il MCP (Model Context Protocol) Server fornisce metodi per LLM per connettersi e recuperare dati dalle infrastrutture.
|
||||
|
||||
## Base URL
|
||||
|
||||
```
|
||||
https://docs.datacenter.local/mcp
|
||||
```
|
||||
|
||||
## Metodi Disponibili
|
||||
|
||||
### GET /methods
|
||||
|
||||
Lista tutti i metodi disponibili con descrizione e parametri.
|
||||
|
||||
### GET /connections
|
||||
|
||||
Lista connessioni configurate (senza credenziali).
|
||||
|
||||
## Execution Endpoints
|
||||
|
||||
### POST /execute/ssh
|
||||
|
||||
Esegui comando SSH su device.
|
||||
|
||||
**Request:**
|
||||
```json
|
||||
{
|
||||
"connection_name": "switch-core-01",
|
||||
"command": "show version"
|
||||
}
|
||||
```
|
||||
|
||||
### POST /execute/snmp/get
|
||||
|
||||
Query SNMP GET su OID specifico.
|
||||
|
||||
**Request:**
|
||||
```json
|
||||
{
|
||||
"connection_name": "ups-01",
|
||||
"oid": ".1.3.6.1.2.1.33.1.2.1.0"
|
||||
}
|
||||
```
|
||||
|
||||
### POST /execute/api
|
||||
|
||||
Esegui richiesta API REST.
|
||||
|
||||
**Request:**
|
||||
```json
|
||||
{
|
||||
"connection_name": "vcenter-prod",
|
||||
"endpoint": "/rest/vcenter/vm",
|
||||
"method": "GET"
|
||||
}
|
||||
```
|
||||
|
||||
## Esempi
|
||||
|
||||
### Python con MCP
|
||||
```python
|
||||
import asyncio
|
||||
from mcp_client import MCPClient
|
||||
|
||||
async def get_infrastructure_data():
|
||||
client = MCPClient('https://docs.datacenter.local/mcp')
|
||||
|
||||
# Get VMware VMs
|
||||
vms = await client.vmware_get_vms('vcenter-prod')
|
||||
|
||||
# Get switch config
|
||||
config = await client.cisco_get_interfaces('switch-core-01')
|
||||
|
||||
# Get UPS status
|
||||
ups_status = await client.ups_get_status('ups-01')
|
||||
|
||||
return {
|
||||
'vms': vms,
|
||||
'network': config,
|
||||
'power': ups_status
|
||||
}
|
||||
|
||||
data = asyncio.run(get_infrastructure_data())
|
||||
```
|
||||
|
||||
## Security
|
||||
|
||||
- Accesso limitato a rete management
|
||||
- Read-only operations only
|
||||
- Audit logging completo
|
||||
- Rate limiting per connessione
|
||||
181
docs/index.md
Normal file
181
docs/index.md
Normal file
@@ -0,0 +1,181 @@
|
||||
# Documentazione Datacenter
|
||||
|
||||
Benvenuto nella documentazione tecnica completa del datacenter.
|
||||
|
||||
!!! info "Aggiornamento Automatico"
|
||||
Questa documentazione è generata e aggiornata automaticamente da un sistema di automazione.
|
||||
Ultimo aggiornamento: {{ git.date }}
|
||||
|
||||
## 🎯 Panoramica
|
||||
|
||||
Questa documentazione fornisce una visione completa e dettagliata di tutti gli aspetti tecnici del datacenter, inclusi:
|
||||
|
||||
- Infrastruttura fisica (layout, elettrico, raffreddamento)
|
||||
- Networking (switch, router, firewall, VLAN)
|
||||
- Server e virtualizzazione
|
||||
- Storage (SAN, NAS, object storage)
|
||||
- Sicurezza e compliance
|
||||
- Backup e disaster recovery
|
||||
- Monitoring e alerting
|
||||
- Database e middleware
|
||||
- Procedure operative
|
||||
|
||||
## 📊 Struttura Documentazione
|
||||
|
||||
La documentazione è organizzata nelle seguenti sezioni principali:
|
||||
|
||||
### Infrastruttura
|
||||
|
||||
<div class="grid cards" markdown>
|
||||
|
||||
- :material-server-network:{ .lg .middle } __Infrastruttura Fisica__
|
||||
|
||||
---
|
||||
|
||||
Layout datacenter, rack, sistema elettrico (UPS, generatori), raffreddamento, sicurezza fisica
|
||||
|
||||
[:octicons-arrow-right-24: Vai alla sezione](sections/01_infrastruttura_fisica.md)
|
||||
|
||||
- :material-lan:{ .lg .middle } __Networking__
|
||||
|
||||
---
|
||||
|
||||
Switch, router, firewall, VLAN, routing, DNS/DHCP, monitoring rete
|
||||
|
||||
[:octicons-arrow-right-24: Vai alla sezione](sections/02_networking.md)
|
||||
|
||||
- :material-server:{ .lg .middle } __Server e Virtualizzazione__
|
||||
|
||||
---
|
||||
|
||||
VMware/Hypervisor, host fisici, VM, cluster, high availability
|
||||
|
||||
[:octicons-arrow-right-24: Vai alla sezione](sections/03_server_virtualizzazione.md)
|
||||
|
||||
- :material-harddisk:{ .lg .middle } __Storage__
|
||||
|
||||
---
|
||||
|
||||
SAN, NAS, object storage, capacity planning, performance
|
||||
|
||||
[:octicons-arrow-right-24: Vai alla sezione](sections/04_storage.md)
|
||||
|
||||
</div>
|
||||
|
||||
### Sicurezza e Compliance
|
||||
|
||||
<div class="grid cards" markdown>
|
||||
|
||||
- :material-shield-check:{ .lg .middle } __Sicurezza__
|
||||
|
||||
---
|
||||
|
||||
IAM, vulnerability management, compliance, encryption, SIEM
|
||||
|
||||
[:octicons-arrow-right-24: Vai alla sezione](sections/05_sicurezza.md)
|
||||
|
||||
- :material-backup-restore:{ .lg .middle } __Backup e DR__
|
||||
|
||||
---
|
||||
|
||||
Backup jobs, RPO/RTO, disaster recovery site, restore testing
|
||||
|
||||
[:octicons-arrow-right-24: Vai alla sezione](sections/06_backup_disaster_recovery.md)
|
||||
|
||||
</div>
|
||||
|
||||
### Operations
|
||||
|
||||
<div class="grid cards" markdown>
|
||||
|
||||
- :material-monitor-dashboard:{ .lg .middle } __Monitoring__
|
||||
|
||||
---
|
||||
|
||||
Piattaforme monitoring, alerting, dashboards, metriche
|
||||
|
||||
[:octicons-arrow-right-24: Vai alla sezione](sections/07_monitoring_alerting.md)
|
||||
|
||||
- :material-database:{ .lg .middle } __Database__
|
||||
|
||||
---
|
||||
|
||||
DBMS, instances, middleware, application servers
|
||||
|
||||
[:octicons-arrow-right-24: Vai alla sezione](sections/08_database_middleware.md)
|
||||
|
||||
- :material-notebook-edit:{ .lg .middle } __Procedure__
|
||||
|
||||
---
|
||||
|
||||
SOP, runbook operativi, escalation, change management
|
||||
|
||||
[:octicons-arrow-right-24: Vai alla sezione](sections/09_procedure_operative.md)
|
||||
|
||||
</div>
|
||||
|
||||
### Strategia
|
||||
|
||||
<div class="grid cards" markdown>
|
||||
|
||||
- :material-lightbulb-on:{ .lg .middle } __Miglioramenti__
|
||||
|
||||
---
|
||||
|
||||
Analisi opportunità, roadmap, ottimizzazioni, investimenti
|
||||
|
||||
[:octicons-arrow-right-24: Vai alla sezione](sections/10_miglioramenti.md)
|
||||
|
||||
</div>
|
||||
|
||||
## 🔌 API REST
|
||||
|
||||
Questa documentazione è accessibile anche tramite API REST per integrazione con sistemi e LLM.
|
||||
|
||||
### Endpoints Principali
|
||||
|
||||
- `GET /api/v1/sections` - Lista tutte le sezioni
|
||||
- `GET /api/v1/sections/{id}` - Contenuto sezione specifica
|
||||
- `GET /api/v1/summary` - Summary ottimizzato per LLM
|
||||
- `GET /api/v1/search?q=query` - Ricerca full-text
|
||||
- `GET /api/v1/stats` - Statistiche documentazione
|
||||
- `GET /api/v1/llm-optimized/{id}` - Contenuto ottimizzato per LLM
|
||||
|
||||
[:octicons-arrow-right-24: Documentazione API completa](api/index.md)
|
||||
|
||||
## 🤖 MCP Server
|
||||
|
||||
Il sistema include un MCP (Model Context Protocol) Server che permette agli LLM di connettersi direttamente alle infrastrutture per recuperare dati in tempo reale.
|
||||
|
||||
### Metodi Disponibili
|
||||
|
||||
- SSH execution su device di rete
|
||||
- SNMP queries su UPS, switch, sensori
|
||||
- API calls a VMware, storage, monitoring
|
||||
- Database queries
|
||||
|
||||
[:octicons-arrow-right-24: Documentazione MCP](api/mcp.md)
|
||||
|
||||
## 📈 Statistiche
|
||||
|
||||
!!! tip "Informazioni Sistema"
|
||||
- **Ultimo aggiornamento**: Automatico ogni 6 ore
|
||||
- **Formato**: Markdown strutturato
|
||||
- **Accesso**: Web UI + API REST
|
||||
- **Ottimizzato per**: Umani e LLM
|
||||
|
||||
## 🔍 Ricerca
|
||||
|
||||
Utilizza la barra di ricerca in alto per trovare rapidamente informazioni specifiche nella documentazione.
|
||||
|
||||
## 📞 Contatti
|
||||
|
||||
Per domande o supporto sulla documentazione:
|
||||
|
||||
- **Team**: Automation Team
|
||||
- **Email**: automation@company.com
|
||||
- **Repository**: [GitHub](https://github.com/company/datacenter-docs)
|
||||
|
||||
---
|
||||
|
||||
*Documentazione generata automaticamente dal sistema di automazione datacenter*
|
||||
Reference in New Issue
Block a user