Proxmox Grafana LXC

- 2 mins read

Proxmox can be configured to export system metrics to Grafana. For this we need to install InfuxDB and Grafana.

Install InfluxDB in LXC

Launch an Ubuntu 24.04 LXC and install influxdb2 following the steps mentioned in the InfluxDB website Link.

After this we need to create a bucket. We do this by visiting the InfluxDB web interface. For the first login you will be using the default credentials and set new password for login.

Create a bucket in InfluxDB and get the following information related to the bucket:

  1. Organisation name of the bucket (specified during installation)

  2. Bucket name (specified during installation)

  3. API Token (which can be created for the bucket from the API token section)

These information need to be fed to Proxmox metrics plugin to export the metrics into influxDB.

Install and Configure Grafana

Lanuch an LXC in proxmox, with 2GB RAM, 8GB storage and 2 CPUs. We have installed an ubuntu 24.04 lxc for this purpose.

Install grafana

apt update
apt-get install apt-transport-https software-properties-common wget
wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key
echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" | tee -a /etc/apt/sources.list.d/grafana.list
apt update
apt-get install grafana-enterprise
systemctl daemon-reload
systemctl enable grafana-server.service
systemctl start grafana-server
systemctl status grafana-server

After installing grafana, browse to the Connections and add influxdb data source as shown in the image below:

grafana connections
grafana data source

Search influxDB data source to configure and add it. Configure the following in the influxDB data source configuration page:

  1. Name: Give a name for your reference

  2. Set Query Language to Flux

  3. Set the HTTP URL to your InfluxDB url. Example, http://192.168.1.20:8086

  4. Organisation, Token and Default Bucket. Set these to match the InfluxDB bucket configuration as explained in Install InfluxDB in LXC section.

Grafana dashboards made by other users are available for import. To monitor proxmox statistics we import Proxmox Cluster [Flux] dashboard by its id, which is 15356.

Configure Proxmox to export metrics to InfluxDB

Under Proxmox Server View we have the Datacenter option. Select Metric Server under the Datacenter options as shown below. Select 'Add >> InfluxDB'. Filll in the server IP, port (8086 by default). Set protocol to HTTP. After this fill the organisation, bucket and tocket as configured in influxDB configuration step explained in Install InfluxDB in LXC.

Metrics Configuration

Once the configuration is done, go to the imported dashboard in Grafana and make sure that the bucket seclected is the one to which proxmox is configured to export metrics to InfluxDB. The Proxmox Dashboard is shown in the following image.

proxmox