Pve exporter

🎯 Purpose

pve_exporter exposes Proxmox VE metrics for Prometheus and Grafana. In this environment, it provides:


βš™οΈ How It Works


🧩 Key Concepts

πŸ“Š Proxmox Metrics

The exporter reports metrics for Proxmox nodes, guests, and storage. Common metric families used by the dashboards include:

The id label identifies a resource, such as node/<name>, qemu/<vmid>, or lxc/<vmid>.

πŸ“Έ VM Snapshot Metrics

The local snapshot collector adds:

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


πŸ“Š 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:

πŸ“Έ Snapshot Metrics Are Missing

Check:

πŸ› οΈ 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


🧾 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.