Resource Consumption and Cost Report

Description

This report is used to show the resources consumed by an Enterprise, and their associated costs. By clicking on the relevant name in the report, it is possible to drill-through to breakdown an individual Enterprise’s resource usage to Virtual Datacenter, Virtual Appliance, and Virtual Machine granularity, showing the cost breakdowns for each.
This report uses the Abiquo accounting data to determine resource usage. And it uses the Enterprise's Abiquo pricing template to calculate the costs. The result is always in hours.

Input Parameters
ParameterDescriptionNotes
Start DateThe beginning of the date range for the reportDefault start date is two years prior to today's date
End DateThe end of the report date range for the report. The report uses data for all the days up to but not including this dateDefault is today's date
Report Content

The report is tabular in format, giving a breakdown of the resource usage and cost in pairs of columns for each resource type with appropriate totals for combined resources. The following is a breakdown of the resources included in the report, and a description of their consumed units:

ResourceDescription
CPUThe number of VM CPUs in hours. For example, a VM with 1 CPU running for a whole day will consume 24 CPU units. Also CPU with the VM powered ON and OFF.
MemoryThe amount of Memory consumed by VMs, in GB per hour. For example, a VM with 4GB of RAM running for a whole day will consume 96 RAM units. Also RAM with the VM powered ON and OFF.
External StorageThe amount of storage allocated in external (network attached) volumes, in GB per hour. Note that External Storage is charged for even when it is not in use by any VM. For example, a 10 GB external volume will consume 240 External Storage units in 24 hours.
VLANThe number of ‘Internal/Private’ VLANs being used, per hour. For example, a VDC with a single VLAN will consume 24 VLAN units in one day
Public IPThe number of Public IP addresses allocated, per hour. Note that Public IPs are charged for even when they are not in use by any VM
Images

The number of Abiquo Apps Library virtual machine templates (or images) being used by VMs, per hour. Note that the cost for Apps Library templates varies, and is dependent on the Cost Code associated with the template and its corresponding cost in an Abiquo pricing template. For example, a VM using a template from the Apps Library will consume 24 units if running for the whole day, but the cost of those units will depend on the template’s Cost Code

Calculations

In this report the consumption units are hours, so Abiquo will convert all accounting usage and pricing data to hours.

The report has two columns, Consume and Cost, which are calculated as follows:

  • Consume =  Accounting usage for report period (recorded per accounting period in granularity units) * Accounting granularity hours conversion factor 
  • Cost = Consume * Pricing cost / Pricing hours conversion factor

Accounting granularity hours conversion factorConverts accounting granularity to hours, e.g. if accounting granularity is month, it is 30 * 24. See Calculation notes below

Pricing hours conversion factor: Converts pricing charging period to hours. The same ratios are used as in the Accounting granularity hours conversion factor.

For the report shown above,

  • The accounting period is HOUR
  • The accounting granularity period is HOUR. 

During the period of the report, the enterprise Abiquo used 40 CPUs with an accounting period of DAY and an accounting period granularity of HOUR. To calculate the consume value we use:

Accounting usage in hours with granularity of hours  * Accounting period granularity hours conversion factor = Consume

522         										 *             1                      = 522

In the pricing model assigned to the enterprise Abiquo:

  • The CPU is charged at 0.1 EUR
  • The charging period is MONTH

Therefore the Cost is calculated as:

Consume x Pricing cost / Pricing hours conversion factor = Cost

  522   x    0.1    /               24 * 30                = 0.0725

In the report, this value is rounded to 2 decimal places, i.e. 0.07

The Pricing hours conversion factor is the same as the Accounting period granularity hours conversion factor. See Calculation notes below.

Calculation notes

To find the Accounting granularity of your system you can use the following MySQL query:

MariaDB [kinton_accounting]> select * from ACCOUNTING_CONFIG_VW;
+--------------------+-------------+--------------------+ ...
| ACCOUNTING_ENABLED | PERIOD_SIZE | PERIOD_GRANULARITY | ...
+--------------------+-------------+--------------------+
|                  1 | DAY         | HOUR               | ...
+--------------------+-------------+--------------------+ ...
1 row in set (0.00 sec)

The Accounting period granularity hours conversion factor is:

Accounting PeriodAccounting period granularity hours conversion factor
HOUR1
DAY

24

WEEK7 * 24
MONTH30 * 24

Note: Accounting usage is recorded per accounting period, but accounting granularity is the unit for storing accounting usage. If accounting period is 1 day and granularity is 1 hour, and 1 CPU is used for 1 hour, accounting takes the maximum value for the accounting period and usage is 24 units.

Copyright © 2006-2022, Abiquo Holdings SL. All rights reserved