Get Billing Statistics for Resource Pool

Use the following API call to view the billing statistics for a resource pool:

1
2
GET /vdcs/:id/statistics.xml
GET /vdcs/:id/statistics.json

XML Request Example

1
curl -i -X GET http://onapp.test/vdcs/88779/statistics.xml -u user:userpass

JSON Request Example

1
curl -i -X GET http://onapp.test/vdcs/88779/statistics.json -u user:userpass
External network labels in vCloud and vCenter should be identical and unique, otherwise, network interface statistics will incorrect.

XML Output Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<vdc_stat type="array">
  <vdc_stat>
    <id type="integer">88779</id>
    <company_id type="integer">89</company_id>
    <vdc_id type="integer">48</vdc_id>
    <cost type="float">0.0</cost>
    <currency_code>USD</currency_code>
    <stat_time type="datetime">2016-01-01T00:00:00Z</stat_time>
    <created_at type="datetime">2016-01-01T00:00:31Z</created_at>
    <updated_at type="datetime">2016-01-01T00:00:31Z</updated_at>
    <vdc_model_type>Allocation</vdc_model_type>
    <status type="symbol">enabled</status>
    <resource_elements>
      <cpu_allocation type="float">1.0</cpu_allocation>
      <cpu_resource_guaranteed type="float">10</cpu_resource_guaranteed>
      <cpu_used type="float">0.0</cpu_used>
      <deployed_edge_gateways type="float">1.0</deployed_edge_gateways>
      <deployed_org_networks type="float">0.0</deployed_org_networks>
      <fast_provisioning_set type="float">1.0</fast_provisioning_set>
      <memory_allocation type="float">8.0</memory_allocation>
      <memory_resource_guaranteed type="float">10</memory_resource_guaranteed>
      <memory_used type="float">0.0</memory_used>
      <thin_provisioning_set type="float">0.0</thin_provisioning_set>
      <vcpu_speed type="decimal">1000.0</vcpu_speed>
      <vs_count type="float">0.0</vs_count>
      <vs_limit type="float">100.0</vs_limit>
    </resource_elements>
    <data_stores type="array">
      <data_store>
        <data_store_id type="integer">64</data_store_id>
        <allocated_amount type="float">512.0</allocated_amount>
        <used_amount type="float">300.0</used_amount>
      </data_store>
    </data_stores>
    <network_interfaces type="array">
      <network_interface>
        <network_interface_id type="integer">117</network_interface_id>
        <data_sent type="float">0.0</data_sent>
        <data_received type="float">0.0</data_received>
        <ip_addresses type="float">1.0</ip_addresses>
      </network_interface>
    </network_interfaces>
  </vdc_stat>
  <vdc_stat>...</vdc_stat>
</vdc_stat>

Where:

  • id - the ID of this unit of statistics
  • company_id - ID of the company with which the resource pool is associated
  • vdc_id - ID of the resource pool to which these statistics refer
  • cost - the total due for the resource pool, network usage and storage policy usage for the hour for which these statistics have been generated
  • currency_code - the code of the currency you’re going to charge in
  • stat_time - the time when the statistics have been recorded
  • created_at - the date in the [YYYY][MM][DD]T[hh][mm][ss]Z format
  • updated_at - the date in the [YYYY][MM][DD]T[hh][mm][ss]Z format
  • vdc_model - the type of resource pool (allocation, reservation or Pay-As-You-Go)
  • status - whether the resource pool is enabled or not
  • resource_elements - an array of parameters that refer to resource pools:
    • cost - the total due for the resource
    • compute zone - ID of the compute zone
    • cpu_limit (for Pay-As-You-Go resource pool only) - the maximum amount of CPU resources which can be used
    • cpu_allocation - the amount of CPU (GHz) allocated to this resource pool
    • cpu_resource_guaranteed - the amount of CPU resources (%) guaranteed to this resource pool
    • cpu_used - the amount of CPU resources used during the hour for which these statistics has been generated
    • deployed_edge_gateways - the total number of edge gateways deployed within this resource pool
    • deployed_org_networks - the total number of org networks deployed within this resource pool
    • fast_provisioning_set - 1.0 if fast provisioning is enabled for the resource pool, otherwise 0.0
    • memory_limit (for Pay-As-You-Go resource pool only) - the maximum amount of memory which can be used
    • memory_allocation - the amount of memory (GB) allocated to this resource pool
    • memory_resource_guaranteed - the amount of memory (%) guaranteed to this resource pool
    • memory_used - the amount of memory (GB) used during the hour for which these statistics have been generated
    • thin_provisioning_set - 1.0 if thin provisioning is enabled for the resource pool, otherwise 0.0
    • vcpu_speed - the vCPU speed that can be consumed after the resource pool is created
    • vs_count - the number of VSs deployed within the resource pool. The parameter equals 0.0 and does not work as expected as of 6.8. See Known Issues.
    • vs_limit - the number of virtual servers that can be created within this resource pool (VS quota)
  • data_stores - an array of parameters that refer to data stores:
    • data_store_zone_id - the ID of the data store zone associated with the resource pool
    • data_store_id - the ID of the data store associated with the resource pool
    • cost - the total due for the resource
    • allocated_amount - the amount of disk size allocated to this resource pool. For Pay-as-you-go, if the allocated amount is unlimited, Virtuozzo OnApp represents it as 99999 value.
    • used_amount - the amount of disk size (GB) used during the hour for which these statistics have been generated
  • network_interfaces - an array of parameters that refer to network interfaces:
    • network_zone_id - ID of the network zone associated with the resource pool
    • network_interface_id - ID of the network interface associated with the resource pool
    • cost - the total due for the resource
    • data_sent - the amount of data sent during the hour for which these statistics have been generated
    • data_received - the amount of data received during the hour for which these statistics have been generated
    • ip_addresses - the total number of IP addresses used at the point when these statistics were generated

Page History

v. 5.0

  • Added the following parameters:
    • cost
    • compute zone
    • deployed_org_networks
    • data_store_zone_id
    • network_zone_id
    • cpu_limit
    • memory_limit