The unreleased proxmox plugin returns wrong values for memory related values
It uses the values from this api endpoint which are incorrect:
GET api2/json/nodes/h0/qemu
{
"data": [
{
"cpu": 0.00399835586338431,
"uptime": 77460,
"diskwrite": 0,
"netin": 3290193935,
"status": "running",
"netout": 1777263510,
"template": "",
"pid": "11785",
"disk": 0,
"mem": 20773341040,
"maxdisk": 34359738368,
"diskread": 0,
"vmid": "107",
"maxmem": 21474836480,
"name": "jenkins",
"cpus": 6
}
]
}
qm status 107 --verbose
...
cpus: 6
disk: 0
diskread: 37974182040
diskwrite: 119857411072
freemem: 4737826816
maxdisk: 34359738368
maxmem: 21474836480
mem: 16311324672
name: jenkins
netin: 3301406704
netout: 1777928118
nics:
tap107i0:
netin: 3301406704
netout: 1777928118
pid: 11785
qmpstatus: running
status: running
template:
uptime: 80532
vmid: 107
the correct api endpoint would be:
/api2/json/nodes/h0/qemu/<vm_id>/status/current
...
"vmid": "107",
"name": "jenkins",
"balloon": 21474836480,
"diskwrite": 119856784384,
"freemem": 4737859584,
"netin": 3301401078,
"status": "running",
"ballooninfo": {
"major_page_faults": 239230,
"last_update": 1603189901,
"total_mem": 21049151488,
"actual": 21474836480,
"max_mem": 21474836480,
"mem_swapped_out": 6266675200,
"minor_page_faults": 1526860997,
"mem_swapped_in": 1195335680,
"free_mem": 4737859584
},
"template": "",
"pid": "11785",
"mem": 16311291904,
"agent": 1,
"maxdisk": 34359738368,
"diskread": 37974177944,
"maxmem": 21474836480,
"cpus": 6
}
}
Relevant telegraf.conf:
[[inputs.proxmox]]
base_url = "https://127.0.0.1:8006/api2/json"
api_token = "xxxxxxx-xxxxxx"
insecure_skip_verify = true
System info:
os: linux/debian 10
arch: amd64
telegraf: git:master - next release: 1.16.0
Steps to reproduce:
- Run telegraf --test with enabled proxmox plugin
- Compare mem values against the output of qm status <vm_id> --verbose
Additional info:
We made a pull request to fix the issue: #8290
The unreleased proxmox plugin returns wrong values for memory related values
It uses the values from this api endpoint which are incorrect:
the correct api endpoint would be:
Relevant telegraf.conf:
System info:
os: linux/debian 10
arch: amd64
telegraf: git:master - next release: 1.16.0
Steps to reproduce:
Additional info:
We made a pull request to fix the issue: #8290