You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Instance network metrics calculation with API #9967
I need to calculate the amount of downloaded and uploaded traffic on each instance for accounting purpose
For example if Download value for an instance reach 20 GB in a week (Download a 1GB file for 20 times)
STEPS TO REPRODUCE
EXPECTED RESULTS
I have downloaded this file with "wget" which it is approximately 2 GB with an instance and I except that the API show me a same value but was not same acctually. here is the like for download file
The only way for check newer version is to use ACS simulator which I'm not sure about its functionality, also I cannot upgrade the current environment to newer one
no @meisammaleki , in a simulator this functionality can not be verified.
The only way for check newer version is to use ACS simulator which I'm not sure about its functionality, also I cannot upgrade the current environment to newer one
I'll try and find the time to verify it in a newer version.
@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= accumulate=true. This will return the sum of all network traffic across the stats retention period.
Activity
DaanHoogland commentedon Nov 25, 2024
@meisammaleki can you try your scenario with a newer version?
meisammaleki commentedon Nov 25, 2024
The only way for check newer version is to use ACS simulator which I'm not sure about its functionality, also I cannot upgrade the current environment to newer one
DaanHoogland commentedon Nov 27, 2024
no @meisammaleki , in a simulator this functionality can not be verified.
I'll try and find the time to verify it in a newer version.
weizhouapache commentedon Jul 16, 2025
What type of zone and network ?
ACS can collect traffic for
4 remaining items
Pearl1594 commentedon Jan 13, 2026
@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
listVirtualMachineMetricsAPI response, please pass theaccumulateparameter 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= accumulate=true. This will return the sum of all network traffic across the stats retention period.DaanHoogland commentedon Mar 2, 2026
this sounds like a functional discussion...