Proxmox Cluster Monitoring
The proxm0x package operates as the primary sensor for the dLAN infrastructure's virtualization layer.
API Integration
The ProxmoxClient connects directly to the Proxmox VE REST API (typically on port 8006).
Authentication
- It authenticates using the
/api2/json/access/ticketendpoint, retrieving aPVEAuthCookieticket and aCSRFPreventionToken. - It gracefully handles
401 Unauthorizedresponses by clearing the cached ticket and forcing a re-authentication before retrying the request. - It bypasses self-signed certificate errors using
InsecureSkipVerify: truein the HTTP transport.
Data Retrieval
- Server Stats: Queries
/nodes/{node}/statusto fetch the host's overall CPU usage, RAM utilization, and Uptime. - Container Fleet: Queries
/nodes/{node}/lxcto get an inventory of all LXC containers (VMID, Name, Status, MaxMem). - Live Container Stats: For containers currently marked as
running, it makes secondary calls to/nodes/{node}/lxc/{vmid}/status/currentto fetch real-time CPU, Memory, and Disk usage percentages.
Dashboard Integration
The package exposes a GetDashboardDataHandler which serves the aggregated server and container statistics as a JSON payload to the frontend. This data powers the visual representations on the Mission Control "Servers" tab.
Guidance for AI Agents
- Proxmox Terminology: Remember that Proxmox uses "VMID" (Virtual Machine ID) as the unique identifier for both full VMs and LXC containers.
- Rate Limiting: Querying the
status/currentendpoint for dozens of running containers can be heavy. Rely on the cached telemetry data injected by thetelemetry_pollerrather than hitting the API manually for every query.