Monitoring of PVE with Zabbix not working

vescovialex

Active Member
Aug 22, 2020
43
6
28
37
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: 80
  • prox2.png
    prox2.png
    7.2 KB · Views: 76
  • prox3.png
    prox3.png
    14.4 KB · Views: 76
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 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: 18
  • Screenshot 2024-07-17 104331.png
    Screenshot 2024-07-17 104331.png
    35 KB · Views: 16
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 ;-)
 
Does the token auth somehow sidestep (bypass) the SSL/TLS? I'm using as self-signed cert on my proxmox host. Perhaps this is the problem. For me the only thing Zabbix can't get is the status of the pve API.
 
Last edited:
Does the token auth somehow sidestep (bypass) the SSL/TLS?
same as me, Zabbix doesn't care about the certificate.

The solution is at post #8

Go back to Permissions and add the same 3 permissions you allocated for the api token but now you have to add them for user created for Zabbix

On my server I went on the longest path, created a new group, allocated that group to the user created for Zabbix, allocated the 3 permissions to the group.

And now I have data inside Zabbix
 
same as me, Zabbix doesn't care about the certificate.

The solution is at post #8

Go back to Permissions and add the same 3 permissions you allocated for the api token but now you have to add them for user created for Zabbix

On my server I went on the longest path, created a new group, allocated that group to the user created for Zabbix, allocated the 3 permissions to the group.

And now I have data inside Zabbix
 

Attachments

  • zabbixUser.png
    zabbixUser.png
    26.6 KB · Views: 15
Yeah. Adding the {$PVE.URL.HOST} and my target host's IP does not help.
.130 is my Zabbix server.
2024/09/01 15:39:23.426218 [101] processing update request (0 requests)
2024/09/01 15:39:23.426225 [101] skipping empty update for unregistered client
2024/09/01 15:41:24.424252 [101] In refreshActiveChecks() from [192.168.10.130:10051]
2024/09/01 15:41:24.425860 [101] End of refreshActiveChecks() from [192.168.10.130:10051]
2024/09/01 15:41:24.425910 [101] processing update request (0 requests)
2024/09/01 15:41:24.425924 [101] skipping empty update for unregistered client
skipping empty update for unregistered client
 

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!