Zabbix connection to Proxmox

M.J.

New Member
Sep 18, 2023
3
0
1
Hi guys, I installed Proxmox VE 8.2.4 & Zabbix 7.0.2 also I added Proxmox VE by HTTP.
I added Api token and configure necessary permissions in cluster.
Unfortunately for some unknown reason They can't connect together.
I ran this command :
curl -kv -H 'Authorization: PVEAPIToken=api@pve!z1234=17ecb235-1fe9-4167-bxx3-a77xxxa1aa85' https://10.xx.xx.xx:8006/api2/json/nodes/pve/termproxy -d ''

Resault:
* Trying 10.xx.xx.xx:8006...
* Connected to 10.xx.xx.xx.xx (10.xx.xx.xx) port 8006 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN: server did not agree on a protocol. Uses default.
* Server certificate:
* subject: OU=PVE Cluster Node; O=Proxmox Virtual Environment; CN=Techpve201.xxxxx.com
* start date: Oct 10 18:45:10 2023 GMT
* expire date: Oct 9 18:45:10 2025 GMT
* issuer: CN=Proxmox Virtual Environment; OU=aa7fcf35-bf74-4b5c-8924-40xxxxx7f2ff; O=PVE Cluster Manager CA
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
* using HTTP/1.x
> POST /api2/json/nodes/pve/termproxy HTTP/1.1
> Host: 10.xx.xx.xx:8006
> User-Agent: curl/7.88.1
> Accept: */*
> Authorization: PVEAPIToken=api@pve!z1234=17ecb235-1fe9-4167-bxx3-a7xxxxxx85
> Content-Length: 0
> Content-Type: application/x-www-form-urlencoded
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
< HTTP/1.1 500 value 'api@pve!z1234' does not look like a valid user name
< Cache-Control: max-age=0
< Connection: close
< Date: Tue, 13 Aug 2024 19:47:36 GMT
< Pragma: no-cache
< Server: pve-api-daemon/3.0
< Content-Length: 13
< Content-Type: application/json;charset=UTF-8
< Expires: Tue, 13 Aug 2024 19:47:36 GMT
<
* Closing connection 0
* TLSv1.3 (OUT), TLS alert, close notify (256):

If enybody has any exprience about it , help me pls.
 
In my setup, the Zabbix user needs these permissions:
  • VM.Audit
  • Sys.Audit

The user configuration is basically Group > Roles > Users > API Tokens

You could test it with something like this:

Bash:
# GET NODE STATUS
curl -v -k -X GET -H "Authorization: PVEAPIToken=${USERNAME}@${REALM}!${TOKEN_NAME}=${TOKEN_VALUE}" ${APIURL}/api2/json/nodes/${NODE_NAME}/status

# Note the variables as placeholders.
 
Last edited:

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!