Monitoring with Prometheus and Grafana (Testing still in progress)

First create auser on proxmox 

 

 

 Next setup group permissions 

 

 next setup an api token 

 

 copy your api token 

 

 

 e34d851e-c847-47c1-a6e1-9082347bc5cd 

 

 

 create a pve.yml file and place in /etc/prometheus/pve.yml 

 default:

 user: prometheus@pve

 token_name: "exporter"

 token_value: e34d851e-c847-47c1-a6e1-9082347bc5cd

 verify_ssl: false 

 

 Add Service Unit to prometheus server (make sure to create a prometheus user on host in order to run the unit) 

 tee /etc/systemd/system/prometheus-pve-exporter.service<<EOF

> [Unit]

> Description=Prometheus Exporter for Proxmox VE

> Documentation=https://github.com/znerol/prometheus-pve-exporter

> 

> [Service]

> Restart=always

> User=prometheus

> ExecStart=/usr/local/bin/pve_exporter /etc/prometheus/pve.yml

> 

> [Install]

> WantedBy=multi-user.target

> EOF

[Unit]

Description=Prometheus Exporter for Proxmox VE

Documentation=https://github.com/znerol/prometheus-pve-exporter

[Service]

Restart=always

User=prometheus

ExecStart=/usr/local/bin/pve_exporter /etc/prometheus/pve.yml

[Install]

WantedBy=multi-user.target