3.2 KiB
3.2 KiB
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
-
Repo auf dem Zielsystem klonen und Binary bauen:
apt install -y git golang-go git clone https://git.cynfo.net/christian/rmm2.git /opt/rmm cd /opt/rmm make agent-linux VERSION=1.0.0 -
Installationsskript ausführen:
cd /opt/rmm/agent-linux chmod +x install.sh ./install.sh -
Konfiguration anpassen:
nano /etc/rmm/config.yaml -
Service starten:
systemctl start rmm-agent-linux systemctl status rmm-agent-linux journalctl -u rmm-agent-linux -f
Konfiguration
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
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
# 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 undsystemd - Package-Updates:
apt list --upgradablestattpkg - Services:
systemctlstattservice - Proxmox: Zusätzliche
pvesh-Integration für VMs/Container - Keine OPNsense-Features: Kein WireGuard, DHCP, Certificates, etc.
Troubleshooting
# 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