Monitoring Proxmox with Datadog

fabianb_ecb

New Member
Sep 29, 2025
4
0
1
Hi,
I am trying to set up Datadog monitoring for Proxmox VE 9.x, but having issue the following issue:

2025-10-17 10:27:31 CEST | CORE | ERROR | (pkg/collector/worker/check_logger.go:71 in Error) | check:proxmox | Error running check: [{"message":"'NoneType' object has no attribute 'get'","traceback":"Traceback (most recent call last):\n File \"/opt/datadog-agent/embedded/lib/python3.12/site-packages/datadog_checks/base/checks/base.py\", line 1313, in run\n self.check(instance)\n File \"/opt/datadog-agent/embedded/lib/python3.12/site-packages/datadog_checks/proxmox/check.py\", line 389, in check\n self._collect_resource_metrics()\n File \"/opt/datadog-agent/embedded/lib/python3.12/site-packages/datadog_checks/proxmox/check.py\", line 299, in _collect_resource_metrics\n hostname = self._get_vm_hostname(vm_id, resource_name, node)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/opt/datadog-agent/embedded/lib/python3.12/site-packages/datadog_checks/proxmox/check.py\", line 157, in _get_vm_hostname\n hostname = hostname_json.get(\"data\", {}).get(\"result\", {}).get(\"host-name\", vm_name)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAttributeError: 'NoneType' object has no attribute 'get'\n"}]

Datadog support says that this is a permission issue, I have created a local user in the PAM realm (tried with PVE as well) and give the necessary permission (event tried with Administrator) but the issue is still there.

I have also tried to switch on and off the privilege separation on the API toke, but no luck.


Can you please help ?

Thanks,
Benjamin
 
Seems like a problem with the check itself. There is not the correct result reported back. Please ask the vendor / developer to debug this further.
 
Than, Why I got this one ?
root@**************************:/etc/datadog-agent# curl -vk -H 'Authorization: PVEAPIToken=**************************' 'https://*************:8006/api2/json/cluster/metrics/export?timeframe=hour&cf=AVERAGE'
* Host **************************:8006 was resolved.
* IPv6: (none)
* IPv4: **************************
* Trying **************************:8006...
* ALPN: curl 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 change cipher, Change cipher spec (1):
* 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 / X25519MLKEM768 / RSASSA-PSS
* ALPN: server did not agree on a protocol. Uses default.
* Server certificate:
* subject: OU=PVE Cluster Node; O=Proxmox Virtual Environment; CN=**************************
* start date: Oct 6 07:59:43 2025 GMT
* expire date: Oct 6 07:59:43 2027 GMT
* issuer: CN=Proxmox Virtual Environment; OU=c424bd07-8c64-4531-a384-bfa13c56b046; O=PVE Cluster Manager CA
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
* Certificate level 0: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
* Connected to ************************** (**************************) port 8006
* using HTTP/1.x
> GET /api2/json/cluster/metrics/export?timeframe=hour&cf=AVERAGE HTTP/1.1
> Host: **************************:8006
> User-Agent: curl/8.14.1
> Accept: */*
> Authorization: PVEAPIToken=**************************
>
* Request completely sent off
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
< HTTP/1.1 403 Permission check failed (/, Sys.Audit)
< Cache-Control: max-age=0
< Connection: close
< Date: Fri, 17 Oct 2025 13:31:26 GMT
< Pragma: no-cache
< Server: pve-api-daemon/3.0
< Content-Length: 66
< Content-Type: application/json;charset=UTF-8
< Expires: Fri, 17 Oct 2025 13:31:26 GMT
<
* shutting down connection #0
{"message":"Permission check failed (/, Sys.Audit)\n","data":null}

this is what i set up:
1760712625356.png
 
Hi, yes, it is a permissions issue.

Here is how I solved it for pve 9.0.11.
User:

1761318633780.png

API token
1761318664710.png

Permissions: PVEAuditor
1761318698940.png
 
Hi,
I did exactly what you have but if I click on the show permission i have this only:
1761319582772.png

1761319631554.png

1761319666866.png

Can somebody help me what is the problem here ?
 
At least now, i have the same permission, however the datadog agent log still contain the mentioned error....
 
Anyone got the journald logs working here?

The conf has the following:
Code:
logs:
  - type: journald
    source: proxmox
    include_units:
    - pveproxy.service
    - pvedaemon.service
    - pve-firewall.service
    - pve-ha-crm.service
    - pve-ha-lrm.service
    - pvescheduler.service
    - pvestatd.service
    - qmeventd.service
I did run usermod -a -G systemd-journal dd-agent and restarted the dd-agent but I'm not getting any logs even if when forcing a restart of pveproxy.