prometheus-pve / prometheus-pve-exporter

Exposes information gathered from Proxmox VE cluster for use by the Prometheus monitoring system
Apache License 2.0
838 stars 99 forks source link

Node=1&Cluster=0 Returns no data #224

Closed znachtman closed 9 months ago

znachtman commented 9 months ago

When I access

http://pve-exporter:9221/pve?target=nodename.foo&node=1&cluster=0

I only get:

# HELP pve_onboot_status Proxmox vm config onboot value
# TYPE pve_onboot_status gauge

Additional information:

::ffff:172.16.10.9 - pve-prometheus-ro@pve [09/01/2024:22:43:56 -0800] "GET /api2/json/nodes/nodename/qemu/112/config HTTP/1.1" 200 562
::ffff:172.16.10.9 - pve-prometheus-ro@pve [09/01/2024:22:43:56 -0800] "GET /api2/json/nodes/nodename/qemu/133/config HTTP/1.1" 200 437
::ffff:172.16.10.9 - pve-prometheus-ro@pve [09/01/2024:22:43:56 -0800] "GET /api2/json/nodes/nodename/qemu/103/config HTTP/1.1" 200 647
::ffff:172.16.10.9 - pve-prometheus-ro@pve [09/01/2024:22:43:56 -0800] "GET /api2/json/nodes/nodename/qemu/131/config HTTP/1.1" 200 433
::ffff:172.16.10.9 - pve-prometheus-ro@pve [09/01/2024:22:43:56 -0800] "GET /api2/json/nodes/nodename/qemu/109/config HTTP/1.1" 200 434
::ffff:172.16.10.9 - pve-prometheus-ro@pve [09/01/2024:22:43:56 -0800] "GET /api2/json/nodes/nodename/qemu/101/config HTTP/1.1" 200 433
::ffff:172.16.10.9 - pve-prometheus-ro@pve [09/01/2024:22:43:56 -0800] "GET /api2/json/nodes/nodename/qemu/100/config HTTP/1.1" 200 527

Nothing is in the prompve/prometheus-pve-exporter logs, outside of TLS warnings that are generated when accessing various proxmox nodes (e.g. /opt/prometheus-pve-exporter/lib/python3.11/site-packages/urllib3/connectionpool.py:1099: InsecureRequestWarning: Unverified HTTPS request is being made to host...).

I'm able to access cluster metrics just fine.

It appears the APIs are getting queried, data is correctly getting returned to PVE exporter (from proxmox); however, it looks like that data is not being returned from PVE exporter as far as I can tell.

znachtman commented 9 months ago

Also for reference, I've reviewed this item in detail: https://github.com/prometheus-pve/prometheus-pve-exporter/issues/156.

I'm also using the grafana dashboard referenced in the readme https://grafana.com/grafana/dashboards/10347-proxmox-via-prometheus/. At the moment, I'm getting a lot of duplicate data, as each node is returning cluster wide metrics. I'm hoping converting the queries to cluster=0&node=1 fixes this issue on the dashboard side, if I can get query parameters to return node-level data.

znerol commented 9 months ago

This is expected behavior. The only node metric is pve_onboot_status. All other metrics are cluster metrics.