rmm2/agent-linux/README.md
cynfo3000 7f9fbd257f Linux/Proxmox Agent + Plattform-Updater + Proxmox Frontend
- agent-linux/: Kompletter Linux/Proxmox RMM Agent
  - Collectors: CPU, Memory, Disk, Network, Services, Updates, Proxmox (VMs, Container, Storage, ZFS), Backups
  - Backup Collector: Jobs nach Node gefiltert (Cluster-aware)
  - WebSocket: Tunnel-Support, writeMux fuer stabile Verbindungen
  - Systemd Service Template

- updater/: Plattform-unabhaengiger Updater (FreeBSD + Linux)
  - runtime.GOOS erkennt Plattform automatisch
  - FreeBSD: /usr/local/rmm/, service rmm_agent
  - Linux: /usr/local/bin/, /etc/rmm/, systemctl rmm-agent
  - Firmware-Download mit ?platform= Parameter

- frontend/: Proxmox-Bereich
  - ProxmoxServers.jsx: Eigene Seite fuer PVE Server mit VM/CT Counts
  - ProxmoxPanel.jsx: Detail-Panel mit Uebersicht, VMs, Container, Storage, ZFS, Tunnel, Dienste, Updates, Backups
  - Agents.jsx: Filtert Linux-Agents raus (nur OPNsense)
  - Sidebar: Proxmox Navigationspunkt
  - Installationsanleitung mit rmm-agent-linux + rmm-updater-linux

- backend: Platform-Feld fuer Agents, Firmware multi-platform
2026-03-01 22:03:18 +01:00

142 lines
3.4 KiB
Markdown

# RMM Agent Linux
Linux/Proxmox Agent für das RMM-System. Sammelt Systemdaten und ermöglicht Remote-Management über WebSocket.
## Features
- **System-Monitoring**: CPU, Memory, Disk, Network, Services, Updates
- **Proxmox-Integration**: VMs, Container, Storage, Cluster, Subscription, ZFS Pools
- **Remote-Commands**: `exec` (beliebige Befehle), `reboot`
- **Agent-Updates**: Automatische Binary-Updates über WebSocket
- **Cross-Platform**: Funktioniert auf normalen Linux-Systemen und Proxmox VE
## Unterstützte Systeme
- Debian/Ubuntu (mit apt)
- Proxmox VE
- Andere Linux-Distributionen mit systemd
## Installation
1. **Binary kompilieren:**
```bash
make agent-linux VERSION=1.0.0
```
2. **Auf Zielsystem installieren:**
```bash
# Dateien kopieren
scp build/rmm-agent-linux root@target-host:/tmp/
scp agent-linux/install.sh root@target-host:/tmp/
scp agent-linux/rmm-agent-linux.service root@target-host:/tmp/
scp agent-linux/config.yaml.example root@target-host:/tmp/
# Installation
ssh root@target-host
cd /tmp
chmod +x install.sh
./install.sh
```
3. **Konfiguration anpassen:**
```bash
nano /etc/rmm/config.yaml
```
4. **Service starten:**
```bash
systemctl start rmm-agent-linux
systemctl status rmm-agent-linux
journalctl -u rmm-agent-linux -f
```
## Konfiguration
```yaml
backend_url: "https://your-rmm-backend.example.com"
api_key: "your-api-key-here"
interval_seconds: 60
agent_name: "linux-server-01"
insecure: true # Für Entwicklung, false für Produktion
```
## CLI-Flags
```bash
rmm-agent-linux [flags]
Flags:
-config string
Path zur Konfigurationsdatei (default "/etc/rmm/config.yaml")
-insecure
TLS-Zertifikatpruefung deaktivieren
-version
Version anzeigen
```
## Proxmox-Features
Wenn auf Proxmox VE installiert, sammelt der Agent zusätzlich:
- **VMs/Container**: Status, Ressourcen-Usage, Uptime
- **Storage**: Verfügbarer Platz, Typen (ZFS, LVM, NFS, etc.)
- **Cluster**: Node-Status, Quorum
- **Subscription**: Lizenz-Status
- **ZFS**: Pool-Health, Scrub-Status, Größen
## Systemd Service
- Service Name: `rmm-agent-linux`
- Config: `/etc/rmm/config.yaml`
- Agent ID: `/etc/rmm/agent_id` (automatisch generiert)
- Logs: `journalctl -u rmm-agent-linux`
## Remote-Commands
Über WebSocket unterstützte Commands:
- **exec**: Beliebige Shell-Befehle ausführen
- **reboot**: System-Neustart
- **agent_update**: Agent-Binary aktualisieren
## Entwicklung
```bash
# Dependencies installieren
cd agent-linux
go mod tidy
# Entwicklung
go run . -config config.yaml.example
# Cross-compile für Linux
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o rmm-agent-linux .
# Mit Version
go build -ldflags "-X main.Version=1.0.0" -o rmm-agent-linux .
```
## Unterschiede zum FreeBSD/OPNsense Agent
- **OS-Detection**: Linux-spezifische `/proc`-Dateien und `systemd`
- **Package-Updates**: `apt list --upgradable` statt `pkg`
- **Services**: `systemctl` statt `service`
- **Proxmox**: Zusätzliche `pvesh`-Integration für VMs/Container
- **Keine OPNsense-Features**: Kein WireGuard, DHCP, Certificates, etc.
## Troubleshooting
```bash
# Service Status
systemctl status rmm-agent-linux
# Live-Logs
journalctl -u rmm-agent-linux -f
# Config testen
rmm-agent-linux -config /etc/rmm/config.yaml -version
# Manuelle Registrierung testen
rm /etc/rmm/agent_id
systemctl restart rmm-agent-linux
```