-
Notifications
You must be signed in to change notification settings - Fork 100
PVE Exporter on Proxmox VE Node in a venv
znerol edited this page Jun 30, 2024
·
3 revisions
Make sure venv
is installed (i.e. apt install python3-venv
), then prepare a new env for the PVE Exporter:
python3 -m venv /opt/prometheus-pve-exporter
Install PVE Exporter into the new env:
/opt/prometheus-pve-exporter/bin/pip install prometheus-pve-exporter
Note: During the installation of pyyaml
pip might complain that the C bindings cannot be compiled. This is not a problem as long as it finally emits the following line: Successfully installed prometheus-pve-exporter requests prometheus-client pyyaml proxmoxer certifi idna chardet urllib3
Check whether pve_exporter
is executable:
/opt/prometheus-pve-exporter/bin/pve_exporter --help
The configuration file uses YAML syntax. Be sure to provide the proper account and password.
mkdir -p /etc/prometheus
cat <<EOF > /etc/prometheus/pve.yml
default:
user: prometheus@pve
password: sEcr3T!
verify_ssl: false
EOF
Add a systemd unit for the PVE Exporter:
cat <<EOF> /etc/systemd/system/prometheus-pve-exporter.service
[Unit]
Description=Prometheus exporter for Proxmox VE
Documentation=https://github.com/znerol/prometheus-pve-exporter
[Service]
Restart=always
User=prometheus
ExecStart=/opt/prometheus-pve-exporter/bin/pve_exporter --config.file /etc/prometheus/pve.yml
[Install]
WantedBy=multi-user.target
EOF
Then reload systemd and start the unit:
systemctl daemon-reload
systemctl start prometheus-pve-exporter