Pve exporter
π― Purpose
pve_exporter exposes Proxmox VE metrics for Prometheus and Grafana. In this environment, it provides:
- Node, storage, and virtual machine metrics from the Proxmox API
- VM snapshot timestamps and a snapshot collection health metric
- A per-node view of Proxmox, alongside host-level metrics from Node Exporter
βοΈ How It Works
pve_exporterruns on each Proxmox node and listens on port9221- Prometheus scrapes
/pveevery 30 seconds, passingmodule=localandtarget=localhost - Each exporter reads its local Proxmox API; the same cluster-wide API token is used on every node
- Grafana uses the resulting metrics for Proxmox dashboards
π§© Key Concepts
π Proxmox Metrics
The exporter reports metrics for Proxmox nodes, guests, and storage. Common metric families used by the dashboards include:
pve_upβ resource availabilitypve_cpu_usage_ratiopve_memory_usage_bytesandpve_memory_size_bytespve_disk_usage_bytesandpve_disk_size_bytespve_guest_infopve_disk_read_bytes_totalandpve_disk_written_bytes_totalpve_network_receive_bytes_totalandpve_network_transmit_bytes_total
The id label identifies a resource, such as node/<name>, qemu/<vmid>, or lxc/<vmid>.
πΈ VM Snapshot Metrics
The local snapshot collector adds:
pve_vm_snapshot_created_timestamp_secondsβ creation time for collected QEMU VM snapshotspve_vm_snapshot_collection_successβ whether the local snapshot collection completed successfully
Templates and the current snapshot entry are excluded. Snapshot collection requires the Proxmox API token to have the necessary access, including VM.Audit.
π Configuration & Service
Configuration file:
/etc/pve_exporter/pve.yml
Service:
pve_exporter (systemd)
Listener:
0.0.0.0:9221
The service runs as the pve-exporter system user. The API token value is supplied through Ansible vault; do not put it in this page, metric labels, or other public configuration.
π Deployment
The pve_exporter inventory group contains the Proxmox nodes. Deploy the exporter with:
source /opt/python_3.12/bin/activate
ansible-playbook -i inventory/pve/inventory.ini playbooks/prometheus/deploy_pve_exporter.yml
To deploy Node Exporter and PVE Exporter together, use:
ansible-playbook -i inventory/pve/inventory.ini playbooks/proxmox/deploy_pve_monitoring.yml
Refresh Prometheus scrape targets after inventory changes:
ansible-playbook playbooks/prometheus/deploy_prometheus_exporters.yml
This refresh command uses the repositoryβs full combined inventory (inventory/); do not limit it to inventory/pve/, or exporter groups from other inventories will be omitted from that run.
Syntax-check the deployment playbook before applying changes:
ansible-playbook -i inventory/pve/inventory.ini --syntax-check playbooks/prometheus/deploy_pve_exporter.yml
The Deploy PVE_Exporter to Proxmox Nodes runbook provides detailed stops on deploying the PVE Exporter using Ansible.
π Common Prometheus Queries
- Check that each exporter endpoint is reachable:
up{job="pve_exporter"} - Check Proxmox node availability:
pve_up{id=~"node/.+"} - Check unavailable guests:
pve_up{id=~"(qemu|lxc)/.+"} == 0 - Check snapshot collector health:
pve_vm_snapshot_collection_success - Find VM snapshot creation times:
pve_vm_snapshot_created_timestamp_seconds
π Grafana Usage Notes
The Proxmox dashboards use the pve_exporter job for node, storage, guest, and snapshot panels. Node Exporter is a separate job and provides operating-system metrics for the same hosts.
π οΈ Troubleshooting
β Exporter Target Is Down
Check:
- The
pve_exportersystemd service is active on the Proxmox node - Port
9221is reachable from Prometheus - The Prometheus target uses
/pve,module=local, andtarget=localhost - The API token is configured through vault and can access the Proxmox API
πΈ Snapshot Metrics Are Missing
Check:
pve_vm_snapshot_collection_successis1- The token has
VM.Auditaccess for the local nodeβs VMs - The service logs for API access errors
π οΈ Quick Verification Commands
systemctl status pve_exporter
journalctl -u pve_exporter -n 50 --no-pager
curl -G 'http://localhost:9221/pve' \
--data-urlencode 'module=local' \
--data-urlencode 'target=localhost'
π Security & Operational Guidance
- Keep the API token in Ansible vault; never put it in source-controlled plaintext
- Restrict access to port
9221to Prometheus and trusted administration hosts - Use a dedicated API user and token with only the permissions needed for collection
- Protect the exporter configuration file because it contains API credentials
π§Ύ Summary
pve_exporter exposes Proxmox API metrics from each node for Prometheus to scrape. Its additional snapshot collector makes VM snapshot age visible in Grafana, while Node Exporter separately reports host-level health.