Repository navigation
Instance network metrics calculation with API #12727
ISSUE TYPE
COMPONENT NAMECLOUDSTACK VERSION 4.17.2CONFIGURATIONOS / ENVIRONMENTSUMMARYI need to calculate the amount of downloaded and uploaded traffic on each instance for accounting purpose STEPS TO REPRODUCEEXPECTED RESULTSI 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 https://github.com/szalony9szymek/large/releases/download/free/large this is returned values form api : ACTUAL RESULTS |
Replies: 6 comments
|
@meisammaleki can you try your scenario with a newer version? |
|
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.
I'll try and find the time to verify it in a newer version. |
|
What type of zone and network ? ACS can collect traffic for
|
|
@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 |
|
this sounds like a functional discussion... |
@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=tru…