GitHub user Pearl1594 added a comment to the discussion: Instance network 
metrics calculation with API

@meisammaleki Could you also please let us know which API are you referring to 
where you see the discrepancy? If you are referring to the 
`listVirtualMachineMetrics` API response, please pass the `accumulate` 
parameter and set it to true, to see the correct value. When you call the API 
without accumulate=true, the networkread value (e.g., "41.20 MiB") represents 
only the inbound traffic in the last 60 seconds - essentially the current 
download rate, not the cumulative total. This is why it appears much lower than 
expected. To see the correct total inbound traffic that your VM has received, 
you must add accumulate=true to your API call: cloudmonkey list 
virtualmachinemetrics id=<vm-uuid> accumulate=true. This will return the sum of 
all network traffic across the stats retention period.

GitHub link: 
https://github.com/apache/cloudstack/discussions/12727#discussioncomment-15970934

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to