Skip to content
Geek is the Way!
Menu
  • Forums
  • Sobre o blog
  • Contato
  • English
Menu

Monitoring Proxmox VE using Zabbix Agent

Posted on December 31, 2022December 30, 2024 by Thiago Crepaldi

Last Updated on December 30, 2024 by Thiago Crepaldi

From previous posts, we have deployed Zabbix Server on a Proxmox container. We also hardened the installation through Let’s Encrypt certificates for the web frontend and TLS encryption for the communication between Server and Agents/Proxies, after all, although encrypted Zabbix Server <-> Agent/Proxy communication with PSK or SSL certificates πŸ™‚

In this post I will cover how to monitor a Proxmox Virtual Environment (PVE) using Zabbix Agent template. Templates are great because they already pack a bunch of monitoring items, actions, triggers, etc that we would have to add one by one otherwise. Using template is smart because when we need to make changes, we just do it in the template and all hosts that use them will see the new settings. On a manual setup, you would have to make the change in each host, one by one…

This post assumes you already installed and configured your Zabbix Agent, but if you didn’t, refer to How to install and configure Zabbix agent and resume from here when you are done.

Configuring Proxmox VE

In order to allow the Zabbix Server to monitor Proxmox VE, we need to create an user, a Token ID and set some permissions to them.

After logging in to your Proxmox VE, navigate to Server View >> Datacenter followed by submenu Permissions >> User and click on Add

  • User name: zabbix
  • Realm: Linux PAM
  • Group: empty
  • Expire: never
  • Enabled: checked
  • First Name: be creative
  • Last Name: keep creative
  • E-mail: less creative, maybe an actual valid email for a possible notification
  • Comment: be creative
  • Key ID: leave empty

Click on Add to create the user. Next go to Permissions >> API Tokens and click on Add:

  • User: Select the just created user
  • Token ID: Identifier name without space and special characters (e.g. ZabbixMonitoring01)
  • Privilege separation: checked
  • Expire: never
  • Comments: be creative

Create the Token by clicking Add. Once you do that, a dialog will be shown with Token ID and Secret. Take note of them because they won’t be shown again!

Lastly, let’s create some permissions binding the user and token created to actual resources on the Proxmox by clicking on Permissions submenu followed by Add >> API Token permission:

  • Path: /
  • API Token: Select the token just created
  • Role: PVEAuditor
  • Propagate: checked

Click on Add to complete, and create a new permission again:

  • Path: /nodes/<your_proxmox_node>
  • API Token: Select the token just created
  • Role: PVEAuditor
  • Propagate: checked

Click on Add to complete, and create a new permission again:

  • Path: /vms
  • API Token: Select the token just created
  • Role: PVEAuditor
  • Propagate: checked

Click on Add to complete.

Configuring Zabbix Server through Web UI

Go to Configuration >> Hosts and select your agent with Proxmox VE running. When the configuration dialog open, the Host tab should be the default one. Look for the Templates section. In the text box, type “Proxmox” and select the “Proxmox VE by HTTP” in the search result. This will link the template to your agent.

The last step is setting the Proxmox API token information in the plugin so that it can connect to the server and fetch metadata. Click on Macros tab. We will need to add 2 macros related to credentials. Click on Add and fill in the new row as follow:

  • Macro: {$PVE.TOKEN.ID}
  • Value: Type your Token ID
  • Description: A helpful description or leave it empty

Click on Add again

  • Macro: {$PVE.TOKEN.SECRET}
  • Value: Type your Token password
  • Description: A helpful description or leave it empty

That is it, let’s try it. Go to Monitoring >> Latest data. In the filter section, type the name of your Proxmox server in the Hosts box, Proxmox in the Name box and finally hit Apply. A list of items should be displayed for it, such as Proxmox: API service status, etc

That is it, have fun!

Share this:

  • Tweet

Related

24 thoughts on “Monitoring Proxmox VE using Zabbix Agent”

  1. Benny says:
    February 5, 2023 at 3:23 PM

    Maybe a bug or a change in behavior. Here my Promox 7.3-4 monitored by Zabbix 6.2.6 I needed to add the permissions not only to the token, but also for the user! Until adding the user also I always got a “403 Permission check failed (/, Sys.Audit)” even when trying to connect via postman

    Reply
    1. AnusMaximus says:
      June 11, 2023 at 11:39 AM

      Thx for this, I had the same problem with proxmox 7.4.13 and zabbix 6.4.3.

      Reply
    2. Ed says:
      February 23, 2024 at 4:47 PM

      How do you do this? I have this issue but don’t understand what it means to add permissions to the user.

      Reply
      1. gologanandrei says:
        March 20, 2025 at 5:07 AM

        You must look here: Lastly, let’s create some permissions binding the user and token created to actual resources on the Proxmox by clicking on Permissions submenu followed by Add >> User Permission, the same as API permissins above.

        Reply
  2. Charles says:
    May 10, 2023 at 9:52 PM

    Excellent work and information! this site has been a huge help in getting ZABBIX monitoring for my home lab up and running.

    Thanks a million!

    Reply
  3. Simpo says:
    August 29, 2023 at 6:40 AM

    Hi

    Thanks for the support but follow all your steps i get the Unknown Error (520)
    There is no post on internet to help about how to help with this issue =(

    Thanks for your support

    Reply
  4. simpo says:
    August 29, 2023 at 7:40 AM

    Hi

    Please could you try to help me with this error Unknown Error (520)
    There is no post or forum on internet that explain as you did but follow all your steps same result for this error

    Reply
    1. Thiago Crepaldi says:
      August 29, 2023 at 7:53 AM

      Can you paste the logs? It might be that you have low memory and need to change Zabbix configuration to decrease the amount of simultaneous tasks or maximum memory used

      Reply
  5. Roland says:
    October 3, 2023 at 8:44 AM

    Hy

    One Question, why do you use a pam user?
    On a Cluster with multiple Node the pam have to be created on every node I think.
    A pve User is replicated via Proxmox Usermanagement.

    kr
    Roland

    Reply
    1. Thiago Crepaldi says:
      October 3, 2023 at 9:10 AM

      I am still using a single server Proxmox, but you got a good point. I think β€œProxmox VE Authentication” should work too. If you try that route, let me know your findings and I can update the post with this possibility too. Thanks

      Reply
  6. captain says:
    November 1, 2023 at 11:51 PM

    One reason to use pam is the user is automatically created when the agent is installed, but its a service account that cant be logged into so its secure. No need in creating a full user account that can be logged into.

    Reply
  7. John MacDowall says:
    December 5, 2023 at 6:28 AM

    Why do you have to list each of the /nodes/pve[1-n] but can get away with /vms?

    Reply
  8. Konrad says:
    March 7, 2024 at 4:04 AM

    You must create new permissions where, path: / user: zabbix@pam, role ex PVEAuditor oraz Propagate: true.

    Reply
  9. ArtΕ«rs Pupausis says:
    March 30, 2024 at 4:29 PM

    I’m getting Unknown Error (520). I have done all of the steps above on a new user Linux and on root. Nothing changes. Went as far as to install ufw on zabbix server and allowed all the necessary ports. Let me know, what am I missing?

    Reply
  10. Matthew Herzog says:
    June 27, 2024 at 12:48 PM

    Thanks a million for this post. I would make a donation but I stopped using paypal a while back. There must be another payment system you could use.

    Reply
    1. Thiago Crepaldi says:
      June 27, 2024 at 1:39 PM

      Hello Matthew, I just added a “Buy me a coffee” button on the top right corner which accepts money using credit card through Stripe. Give it a try and thank you for your support πŸ™‚

      Reply
  11. John says:
    August 14, 2024 at 4:44 PM

    Do you need to add the server details in SNMP portion when configuring the host? If so is it SNMP1/2/3 what is the community string? I’m getting the same error as above “Unknown Error 502”

    Reply
  12. John says:
    August 15, 2024 at 3:35 PM

    I figured it out from some further searching. You need to add another MACRO : {$PVE.URL.HOST} and the IP address. This worked!!!

    Reply
    1. Konrad Tjaden says:
      October 14, 2024 at 10:57 AM

      Thanks for this, its the actual IP address and not https://123.123.123.123, just 123.123.123.123.

      If only this was made clearer since URL = https:// and IP == IP πŸ™‚ Slight confusion in macro naming.

      Reply
  13. Freddy Taborda says:
    September 3, 2024 at 10:49 PM

    Hello everyone

    I am using this guide, but with Proxmox 8.2.4 I get error 403 in the query api2/json/nodes/pve-01/status”.

    I have tried with give full permission to the API, and even create the user in the Linux console, but still to that query is always 403.

    403 ForbiddenThe client does not have the necessary permissions for certain content, so the server is refusing to give a proper response.

    I don’t understand where the problem is

    Thank you very much for your comments

    Translated with DeepL.com (free version)

    Reply
  14. Lukasz says:
    November 24, 2024 at 8:19 AM

    Hello

    When Zabbix will report API service is not available when is need to be update settings in macro and add”: {$PVE.URL.HOST} and put ip address (without http or https) for proxomox.

    Reply
  15. Ashre says:
    December 2, 2024 at 7:42 PM

    Thank you for your article. This provided great value!

    Reply
  16. Matt says:
    March 6, 2025 at 10:35 PM

    I had to add a port macro.

    {$PVE.URL.PORT}

    Also, the value for toket ID in zabbix was “username@pam!toketid”. I just put the token ID but didnt work.

    Reply
  17. ratanak says:
    March 17, 2025 at 1:29 PM

    lxc metric work but node metric no data, what was wrong.

    Reply

Leave a ReplyCancel reply

LIKED? SUPPORT IT :)

Buy Me a Coffee


Search


Categories

  • Cooking (1)
  • Homelab (79)
    • APC UPS (6)
    • pfSense (40)
    • Proxmox (20)
    • Shopping (1)
    • Supermicro (2)
    • Synology NAS (8)
    • Ubiquiti (6)
    • UDM-Pro (4)
  • Random (3)
  • Wordpress (1)

Tags

Agentless monitoring (3) AP9631 (3) Apache2 (3) APC UPS (6) Bind9 (3) certificates (5) crontab (2) DDNS (5) debian (3) DNS (7) DSM (6) DuckDNS (2) Dynamic DNS (4) en_US (2) Firewall (9) gmail (3) LDAP (2) Let's Encrypt Certificates (7) monitoring (18) networking (21) PBS (3) pfsense (43) port forwarding (3) proxmox (17) proxmox backup server (3) proxmox virtual environment (16) pve (5) rev202207eng (76) security (28) SNMP (4) SNMPv1 (3) ssh (4) SSL (6) subnet (2) Synology (7) udm-pro (5) unifi (6) unifi controller (3) unifi switch (2) UPS (5) VLAN (4) vpn (9) wifi (4) Zabbix (18) Zabbix Agent2 (11)

See also

Privacy policy

Sitemap

©2025 Geek is the Way! | Design by Superb