Date
1 - 6 of 6
Question regarding simple application statistics
Don Nelson
Someone recently asked me about the data returned from /v2/apps/<APPLICATION_GUID>/stats, regarding whether the stats returned were a total across all instances of the application. I assume that they are, and that to compare usage to quota one would have to divide the usage by number of instances. Can anyone confirm this for me?
Thanks in advance. |
|
Dan Wendorf
Hi Don,
toggle quoted message
Show quoted text
The stats endpoint <http://apidocs.cloudfoundry.org/234/apps/get_detailed_stats_for_a_started_app.html> gives statistics about each instance individually. In the returned JSON object, each instance's stats are nested under their instance index (e.g. `response["2"]`). To get total app usage, you would need to sum over all indices. If you wanted to look at quota information, you could also look at the /v2/apps/:app_guid <http://apidocs.cloudfoundry.org/234/apps/retrieve_a_particular_app.html> endpoint, which will report the memory and disk that will be allocated to each instance, as well as the number of instances. Multiplying the quota numbers by the number of instances will give you the amount of resources currently counting against your quota. Cheers, Dan On Wed, Apr 20, 2016 at 10:39 AM, Don Nelson <dieseldonx(a)gmail.com> wrote:
Someone recently asked me about the data returned from |
|
Don Nelson
Thanks Dan!
|
|
Don Nelson
Oops, replied too quickly. Looks like that's an internal site. Is there any external-facing documentation equivalence?
|
|
Graham Bleach
On 20 April 2016 at 19:21, Don Nelson <dieseldonx(a)gmail.com> wrote:
Oops, replied too quickly. Looks like that's an internal site. Is thereCan you clarify what you think is an internal site? Both the links Dan sent; http://apidocs.cloudfoundry.org/234/apps/get_detailed_stats_for_a_started_app.html and http://apidocs.cloudfoundry.org/234/apps/retrieve_a_particular_app.html are public and return content to me. Regards, Graham |
|
Don Nelson
tyvm - there is an extra character at the end of Dan's link, which is why it didn't work for me. Turns out that's the api I was asking about, I just didn't notice the app index at the top of the JSON object.
Don |
|