# luci-app-system-hub **Central Control & Remote Assistance Dashboard for OpenWrt** ๐ŸŽ›๏ธ System Hub est un mรฉta-dashboard centralisรฉ pour OpenWrt permettant de gรฉrer tous vos composants, surveiller la santรฉ du systรจme, et offrir une assistance ร  distance via RustDesk. ![System Hub Dashboard](https://cybermind.fr/images/system-hub-hero.png) ## โœจ Fonctionnalitรฉs ### ๐Ÿงฉ Gestion des Composants - **Vue unifiรฉe** de tous les composants installรฉs - **Actions rapides** : Start, Stop, Restart, Enable, Disable - **ร‰tat en temps rรฉel** : Running, Stopped, Issues - **Roadmap** : Composants planifiรฉs pour le futur - **Catรฉgories** : Sรฉcuritรฉ, Monitoring, Rรฉseau, VPN, Automation ### ๐Ÿ’š Rapports de Santรฉ - **Score global** : 0-100 avec status healthy/warning/critical - **Mรฉtriques** : CPU, RAM, Disque, Tempรฉrature, Rรฉseau, Services - **Seuils configurables** : Warning et Critical par mรฉtrique - **Recommandations** automatiques basรฉes sur l'รฉtat - **Gรฉnรฉration de rapports** PDF/Email - **Historique** des health checks ### ๐Ÿ–ฅ๏ธ Assistance Remote (RustDesk) - **ID unique** pour le support ร  distance - **Approbation requise** pour chaque connexion - **Session timeout** configurable - **Notifications** de connexion - **Accรจs sans surveillance** (optionnel) - **Contact support** intรฉgrรฉ ### ๐Ÿ” Collecte de Diagnostics - **Logs systรจme** : syslog, kernel, composants - **Configuration** : network, wireless, firewall - **Infos rรฉseau** : interfaces, routes, ARP, connexions - **Hardware** : CPU, mรฉmoire, stockage - **Anonymisation** des donnรฉes sensibles - **Archive compressรฉe** (.tar.gz) - **Envoi au support** en un clic ### ๐Ÿ“‹ Logs Unifiรฉs - **Agrรฉgation** de tous les logs composants - **Filtres** : source, niveau, recherche texte - **Export CSV** pour analyse externe - **Temps rรฉel** avec rafraรฎchissement auto - **Niveaux** : info, warning, error ### ๐Ÿ“… Tรขches Planifiรฉes - **Rapport santรฉ quotidien** (6h00) - **Sauvegarde hebdomadaire** (dimanche 3h00) - **Nettoyage logs** (retention 30 jours) - **Cron jobs** personnalisables ## ๐Ÿงฉ Composants Supportรฉs ### Installรฉs (Actuels) | Composant | Description | Catรฉgorie | |-----------|-------------|-----------| | **CrowdSec** | Cybersรฉcuritรฉ collaborative | ๐Ÿ”’ Security | | **Netdata** | Monitoring temps rรฉel | ๐Ÿ“Š Monitoring | | **Netifyd** | Deep Packet Inspection | ๐ŸŒ Network | | **WireGuard** | VPN moderne | ๐Ÿ” VPN | | **Network Modes** | Multi-mode rรฉseau | ๐Ÿ”€ Network | | **Client Guardian** | NAC & Portail Captif | ๐Ÿ›ก๏ธ Security | ### Roadmap (Planifiรฉs) | Composant | Description | Prรฉvu | |-----------|-------------|-------| | **AdGuard Home** | Blocage publicitรฉs DNS | Q1 2025 | | **Prometheus** | Mรฉtriques & Alerting | Q1 2025 | | **Tailscale** | Mesh VPN zero-config | Q1 2025 | | **Grafana** | Visualisation avancรฉe | Q2 2025 | | **Home Assistant** | Domotique intรฉgrรฉe | Q2 2025 | | **ntopng** | Analyse trafic avancรฉe | Q2 2025 | ## ๐Ÿ“ฆ Installation ### Prรฉrequis ```bash opkg update opkg install luci-base rpcd luci-lib-jsonc ``` ### Installation optionnelle ```bash # Pour RustDesk opkg install rustdesk # Pour les emails opkg install msmtp # Pour les diagnostics avancรฉs opkg install curl ``` ### Installation du package ```bash # Depuis les sources git clone https://github.com/gkerma/luci-app-system-hub.git cd luci-app-system-hub make install # Redรฉmarrer rpcd /etc/init.d/rpcd restart ``` ## ๐Ÿ—๏ธ Architecture ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ System Hub Dashboard โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ Overview โ”‚Componentsโ”‚ Health โ”‚ Assistanceโ”‚Diagnosticโ”‚ Logs โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ RPCD Backend โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ status | components | health | remote | diagnostics | logs โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ Component Integration โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ CrowdSec โ”‚ Netdata โ”‚ Netifyd โ”‚WireGuard โ”‚Client Guardianโ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ Remote Assistance โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ RustDesk Integration โ”‚ โ”‚ โ”‚ โ”‚ ID: 847 293 156 | Session Control โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` ## ๐Ÿ”ง Configuration ### Fichier UCI `/etc/config/system-hub` ```bash # Configuration globale config system-hub 'config' option enabled '1' option dashboard_refresh '30' option auto_health_check '1' option health_check_interval '3600' option debug_mode '0' # Remote Assistance config remote 'remote' option enabled '1' option rustdesk_enabled '1' option rustdesk_id '847293156' option require_approval '1' option notify_on_connect '1' # Seuils de santรฉ config health 'health' option enabled '1' option cpu_warning '80' option cpu_critical '95' option memory_warning '80' option memory_critical '95' option disk_warning '80' option disk_critical '95' # Diagnostics config diagnostics 'diagnostics' option collect_logs '1' option collect_config '1' option anonymize_sensitive '1' option upload_enabled '0' # Support config support 'support' option provider 'CyberMind.fr' option email 'support@cybermind.fr' option ticket_url 'https://cybermind.fr/support' # Composant config component 'crowdsec' option name 'CrowdSec' option service 'crowdsec' option status 'installed' option category 'security' ``` ## ๐Ÿ“Š API RPCD | Mรฉthode | Description | Paramรจtres | |---------|-------------|------------| | `status` | ร‰tat global du systรจme | - | | `components` | Liste tous les composants | - | | `health` | Rapport de santรฉ complet | - | | `remote` | Config assistance remote | - | | `logs` | Logs unifiรฉs | `limit`, `source`, `level` | | `schedules` | Tรขches planifiรฉes | - | | `collect_diagnostics` | Gรฉnรฉrer archive | `include_logs`, `anonymize` | | `generate_report` | Crรฉer rapport santรฉ | - | | `start_remote_session` | Dรฉmarrer RustDesk | `type` | | `manage_component` | Contrรดler un service | `component`, `action` | | `upload_diagnostic` | Envoyer au support | `file` | ## ๐ŸŽจ Thรจme - **Couleur principale** : Indigo gradient (#6366f1 โ†’ #8b5cf6) - **Fond** : Dark mode (#0a0a0f, #12121a) - **Status** : Green (ok), Amber (warning), Red (critical) - **Font** : Inter (UI), JetBrains Mono (donnรฉes) ## ๐Ÿ“ Structure du Package ``` luci-app-system-hub/ โ”œโ”€โ”€ Makefile โ”œโ”€โ”€ README.md โ”œโ”€โ”€ htdocs/luci-static/resources/ โ”‚ โ”œโ”€โ”€ system-hub/ โ”‚ โ”‚ โ”œโ”€โ”€ api.js โ”‚ โ”‚ โ””โ”€โ”€ dashboard.css โ”‚ โ””โ”€โ”€ view/system-hub/ โ”‚ โ”œโ”€โ”€ overview.js โ”‚ โ”œโ”€โ”€ components.js โ”‚ โ”œโ”€โ”€ health.js โ”‚ โ”œโ”€โ”€ remote.js โ”‚ โ”œโ”€โ”€ diagnostics.js โ”‚ โ”œโ”€โ”€ logs.js โ”‚ โ””โ”€โ”€ settings.js โ””โ”€โ”€ root/ โ”œโ”€โ”€ etc/ โ”‚ โ”œโ”€โ”€ config/system-hub โ”‚ โ””โ”€โ”€ system-hub/ โ”‚ โ”œโ”€โ”€ reports/ โ”‚ โ””โ”€โ”€ diagnostics/ โ””โ”€โ”€ usr/ โ”œโ”€โ”€ libexec/rpcd/system-hub โ””โ”€โ”€ share/ โ”œโ”€โ”€ luci/menu.d/luci-app-system-hub.json โ””โ”€โ”€ rpcd/acl.d/luci-app-system-hub.json ``` ## ๐Ÿ” Sรฉcuritรฉ - **Approbation requise** pour sessions remote - **Anonymisation** des configs dans les diagnostics - **Logs sensibles** masquรฉs (passwords, keys) - **ACL** granulaires par mรฉthode API - **Timeout** des sessions remote ## ๐Ÿ›ฃ๏ธ Roadmap - [x] Vue d'ensemble systรจme - [x] Gestion des composants - [x] Rapports de santรฉ - [x] Intรฉgration RustDesk - [x] Collecte diagnostics - [x] Logs unifiรฉs - [ ] Application mobile - [ ] API REST externe - [ ] Webhooks/Alertes - [ ] Backup/Restore auto - [ ] Multi-routeurs ## ๐Ÿ“„ Licence Apache-2.0 - Voir [LICENSE](LICENSE) ## ๐Ÿ‘ค Auteur **Gandalf** - [CyberMind.fr](https://cybermind.fr) --- *Votre centre de contrรดle OpenWrt* ๐ŸŽ›๏ธ