Monitoring of PVE with Zabbix not working

vescovialex

Member
Aug 22, 2020
43
6
13
36
www.auxbit.it
Hi,

I've trying to implement Zabbix monitoring with my Proxmox cluster 7.4.3.
Zabbix version 6.4.2, using Proxmox VE by HTTP template

This is the log I have on proxmox for zabbix agent:

4297:20230509:153016.660 **** Enabled features **** 4297:20230509:153016.660 IPv6 support: YES 4297:20230509:153016.660 TLS support: YES 4297:20230509:153016.660 ************************** 4297:20230509:153016.660 using configuration file: /etc/zabbix/zabbix_agentd.conf 4297:20230509:153016.661 agent #0 started [main process] 4378:20230509:153016.661 agent #1 started [collector] 4380:20230509:153016.662 agent #2 started [listener #1] 4381:20230509:153016.662 agent #3 started [listener #2] 4382:20230509:153016.663 agent #4 started [listener #3]

I've follow this instruction: https://geekistheway.com/2022/12/31/monitoring-proxmox-ve-using-zabbix-agent/

But no communication between Zabbix and Proxmox, the API Token seems to be ok, but only this.

Where is the problem?
Thanks
 

Attachments

  • prox1.png
    prox1.png
    74.8 KB · Views: 72
  • prox2.png
    prox2.png
    7.2 KB · Views: 69
  • prox3.png
    prox3.png
    14.4 KB · Views: 68
My guess would be missing privileges for your API token. So you can log in using the token but are not allowed to fetch any metrics.

Did you really checked the "privilege separation" checkbox and set the proper privileges for that token?
 
Last edited:
I've found the solution. The guide is missing an important step. The new user (zabbix) has to be added to the same role as the key API token. By default, a new user only has permissions to /. Check Permissions under the user zabbix
 
I am a little confused by the guide I read on this. It goes through getting the template in and setting the API token but where I get hung up is adding the Host to zabbix. It says something about setting up a container or a VM running the zabbix agent. I can get a container or vm going with the agent but how does it know what my Proxmox server is? No where in the instructions do I see where you set the Proxmox server information for the agent.

Eg: Proxmox server is 192.168.1.2:8006

How does the agent know to do the Proxmox VE by http to the above address?
 
You install the zabbix agent via apt debian 12 repo on your PVE host. You then create a new host in zabbix and setup the zabbix agent. As far as I understand the PVE template will use the IP you have set up for the zabbix agent to access the PVE API.
 
I did as mentioned here...I made sure my token and user have the same rights. Attached are the screenshots of both. I am getting an Unknown Error 520.

I do have a question about the macros to add. The webpage talks about adding only two macros, but I believe you need to identify the URL host also. I have it set as http://192.168.1.5. Is this correct?
 

Attachments

  • Screenshot 2024-07-17 104318.png
    Screenshot 2024-07-17 104318.png
    34.2 KB · Views: 9
  • Screenshot 2024-07-17 104331.png
    Screenshot 2024-07-17 104331.png
    35 KB · Views: 7
but I believe you need to identify the URL host also. I have it set as http://192.168.1.5. Is this correct?
I wanted to answer "and where would you put it in?". Then I reread https://www.zabbix.com/integrations/proxmox and it told me "Set the hostname or IP address of the Proxmox API VE host in the {$PVE.URL.HOST} macro."

It seems I have an old version of that template installed - I do only see "{$PVE.URL.PORT}", no "...HOST" (as it is taken from the main connection to the agent.)

Try to follow the documentation, I would put in only the IP address. And verify you have the current template installed. I've put it on the todo list for myself ;-)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!