Virtual Machine Monitoring
Monitor the virtual machines on a Proxmox VE or libvirt (KVM, QEMU, Xen) host
Virtual Machine Monitoring
Installed on a hypervisor, the agent reports every virtual machine on it: whether it is running, and how much CPU, memory, disk and network it uses. Nothing needs to be installed inside the guests.
Supported hypervisors
| Hypervisor | How the agent reads it | |---|---| | Proxmox VE | Proxmox's API, with an API token or a user and password | | KVM, QEMU and Xen through libvirt | The local libvirt socket, or a libvirt URI |
The agent recognises the hypervisor on its own: a Proxmox node by /etc/pve and its tools, libvirt by virsh or its socket. Hyper-V and VMware are not supported.
Proxmox VE
Create an API token for the agent in Proxmox (Datacenter → Permissions → API Tokens) for a user with read-only access (the PVEAuditor role on / is enough), then add it to /etc/netwarden/netwarden.conf:
yamlvm_hypervisor: proxmox proxmox_api: https://127.0.0.1:8006 proxmox_token_id: monitoring@pve!netwarden proxmox_token_secret: 00000000-0000-0000-0000-000000000000 # proxmox_node: pve1 # leave empty to read every node in the cluster # proxmox_skip_tls_verify: true # Proxmox's own certificate is self-signed
A user and password work too (proxmox_username and proxmox_password), but a token can be revoked on its own and is the better choice. Restart the agent after saving.
libvirt (KVM, QEMU, Xen)
On a host running libvirt the agent connects to the local socket with no configuration. To set it explicitly:
yamlvm_hypervisor: libvirt # libvirt_uri: qemu:///system # libvirt_socket: /var/run/libvirt/libvirt-sock
When a guest runs the QEMU guest agent, the agent also reports what the guest says about itself: memory use inside the guest, its filesystems and the signed-in users.
Choosing which VMs
yaml# vm_include: web-*,db-* # only these # vm_exclude: test-* # all but these # vm_stats_interval: 60s
To turn VM monitoring off on a machine, set enable_vms: false.
What is reported
For each VM:
- State (running, paused, stopped) and uptime
- CPU: usage in percent, vCPUs, and time spent waiting for a physical CPU
- Memory: allocated, used and available, swap activity and page faults
- Disks: capacity, allocation, usage, bytes and operations read and written, flush and wait times
- Network: bytes and packets in and out, errors and drops
And for the host: how many VMs are running, paused and stopped.
The Virtual machines widget shows them on any dashboard, and any of these metrics can carry an alert.