[SOLVED] API netin and netout values

SkyZoThreaD

New Member
Aug 7, 2024
16
0
1
France
Hi there !

I Hope I'm asking in the right place... I'm using the api to monitor my PVE's with a homemade service.
I'm trying to monitor network traffic and a found out that the API's doc is missing the fields I need
First, i'd like to know the node's global traffic by bridge but it looks like it's not possible...
So i thought, why not get the traffic for each VM. And indeed i have netin and netout when i get the qemus (/nodes/pveX/qemu) :
Code:
{"netin":51914344540,"maxmem":2147483648,"diskwrite":0,"mem":1371168324,"cpus":2,"maxdisk":21474836480,"status":"running","uptime":37544636,"cpu":0.0494867198005162,"diskread":0,"name":"censored","pid":1753786,"netout":336572932490,"vmid":105,"disk":0}
I dont understant the units there... 51914344540 or 336572932490 even if we speak of bits, it's way too big to be true... The NIC is a simple Gbe and the VM of this exemple is communicating through the NIC...
It seems the doc is missing these values btw

Can anyone enlight me ?
 
I think i got it...
It's the total amount of data that went through the lan...
So i have to store this value on each tick and do the substraction with the last value.
I did not want to store any value in the backend. I guess i'll have to :'(
 

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!