A lightweight, high-performance FastAPI server that emulates the Proxmox VE REST API. It returns realistic, smoothly fluctuating metrics (CPU, RAM, Network, Disk I/O) using multi-sine wave generation.
Designed specifically for testing and demonstrating monitoring dashboards without needing a real, hardware-heavy Proxmox cluster.
- Ultra Lightweight: Runs 3 entire datacenter clusters inside a single Python process using
asyncio, consuming only ~60MB of RAM. - Realistic Fluctuations: No static data. Metrics dynamically change over time using deterministic mathematical waves.
- Production Ready Mock: Implements proper CORS, rigorous Proxmox JSON error formatting (500/501 errors), and uses
orjsonfor fast serialization. - Zero Configuration: Works out of the box with
docker-compose. Ignores authentication tokens intentionally to simplify frontend demos.
Out of the box, the server simulates 3 distinct Datacenters on 3 different ports, fully populated with Nodes, VMs, and LXC containers.
| Cluster Name | Nodes per Cluster | Resources per Node | Exposed Port |
|---|---|---|---|
datacenter-milan |
3 (64c / 256GB RAM) | ~15 VMs/LXC | 8006 |
datacenter-rome |
3 (32c / 128GB RAM) | ~15 VMs/LXC | 8007 |
datacenter-naples |
3 (48c / 192GB RAM) | ~15 VMs/LXC | 8008 |
Ensure you have Docker and Docker Compose installed.
git clone https://github.com/yourusername/proxmox-mock-server.git
cd proxmox-mock-server
# Use the Makefile for convenience
make run
# Or use standard Docker commands
docker compose up -d --buildBecause the mock server exposes ports 8006, 8007, and 8008 directly to the host, the connection URL depends on where your client/dashboard is running:
-
From a local program (same machine, no Docker):
http://localhost:8006(Milan)http://localhost:8007(Rome)http://localhost:8008(Naples)
-
From the outside (Browser, external server): Replace
localhostwith the public or LAN IP address of the host machine running the mock server.http://<HOST-IP>:8006
-
From another Docker container on the same host:
- You can use the host's LAN IP address (
http://<HOST-IP>:8006). - Or, use the default Docker gateway IP (usually
http://172.17.0.1:8006on Linux). - Alternatively, configure
--add-host host.docker.internal:host-gatewayin your client container and usehttp://host.docker.internal:8006.
- You can use the host's LAN IP address (
The server strictly follows the Proxmox VE API schema. Currently supported:
| Method | Endpoint | Description |
|---|---|---|
GET |
/api2/json/version |
PVE version info |
GET |
/api2/json/cluster/status |
Cluster topology and quorum |
GET |
/api2/json/cluster/resources |
Global list of VMs, LXCs, and Nodes |
GET |
/api2/json/nodes |
List of nodes with aggregated CPU/RAM usage |
GET |
/api2/json/nodes/{node}/rrddata |
Historical RRD metrics (CPU, RAM, Load, I/O) |
GET |
/api2/json/nodes/{node}/storage |
Storage pools (local, ceph, lvm) |
GET |
/api2/json/nodes/{node}/network |
Network interfaces |
GET |
/api2/json/nodes/{node}/qemu |
QEMU VMs list |
GET |
/api2/json/nodes/{node}/lxc |
LXC containers list |
GET |
/api2/json/nodes/{node}/qemu/{id}/status/current |
Deep VM metrics (CPU, Disk I/O, uptime) |
GET |
/api2/json/nodes/{node}/qemu/{id}/agent/network-get-interfaces |
VM IP Addresses |
GET |
/api2/json/nodes/{node}/lxc/{id}/interfaces |
LXC IP Addresses |
(Any unsupported endpoint will return a clean HTTP 501 Not Implemented error).
Contributions are welcome! If your monitoring tool requires a specific Proxmox endpoint that isn't mocked yet:
- Open an Issue using the Feature Request template.
- Submit a Pull Request ensuring the data perfectly matches the real Proxmox API response format.
This project is licensed under the MIT License - see the LICENSE file for details.