Monitoring a Proxmox cluster with Zabbix

By default, the Zabbix agent cannot monitor the status of virtual machines and containers running on a proxmox cluster. Therefore, we need to connect to the HTTP API to retrieve the values.

Of course, you need to monitor the virtual machine itself to get network traffic, or even precise hard disk usage.

To do this, there is a template created that can be found here: https://www.zabbix.com/en/integrations/proxmox#proxmox. This is a template created by the community, it is not officially available now.

At the time of writing this article, monitoring for version 8.4.1 is working

Go to the zabbix git repository to retrieve the .yaml, and import it into Zabbix.

See here how to import a template into a Zabbix server: Import a template into a Zabbix server

Once added, link the " Proxmox VE by HTTP " template, and go to the "Macros" tab

Now open a new tab and connect to the Proxmox cluster. Go to the " Datacenter > Permissions > API Tokens " menu. Add a token with the " Add " button.

Uncheck " Privilege Separation " and specify a " Token ID ". Finally, click " Add ".

The token ID is the identification of the token. In our example, we will enter " demo "
Please note that specifying the user will grant the same rights to the token. Assign the token to the user who will be used for monitoring.

A new window then appears with the token ID and Secret to enter in Zabbix.

Write down the secret carefully and do not share it with anyone else. It gives access to sensitive information about your Promox cluster.

Now go back to the Zabbix server, and in the " Macros " tab, add 3 new macros:

  • {$PVE.TOKEN.ID}: Contains the token ID
  • {$PVE.TOKEN.SECRET}: Contains the secret
  • {$PVE.URL.HOST}: Contains the IP address or FQDN of a cluster member
I recommend putting the IP address of the server on which the template is applied
I recommend doing the configuration on each node of the cluster (assigning each Proxmox host the template and macros). This can be a lot of data, but if a cluster member goes down, data is still collected.

Finally, backup the host and watch the data come back up.