Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

Introduction to accounting architecture

...

This detailed diagram shows the basic architecture of the Accounting system.

Image Modified

Triggers and stored procedures

...

The accounting event tables include the following.

  • backup

  • costcode

  • detail

  • ds_storage

  • firewall

  • ips

  • loadbalancer

  • pm

  • protect

  • repository

  • storage

  • vlan

  • vm

  • vm_off

  • vm_on

...

Field name

Field type

Description

starttime

TIMESTAMP

Start of the time slice

endTime

TIMESTAMP

End of the time slice

idAccountingResourceType

TINYINT

Resource type posted:
virtualmachine-vcpu, virtualmachine-vram, virtualmachine-vhd, ExternalStorage, IPAddress, VLAN, VirtualMachine-hypervisorType

resourceType

VARCHAR

Resource type (text)

resourceName

VARCHAR

Resource Name to account for. A new resource type 'VirtualMachine-hypervisorType' is now recorded for each VM. The Hypervisor Type is recorded in this 'resourceName' column.

resourceUnits

BIGINT

Resource units to account for

idEnterprise

INTEGER

ID enterprise resource owner

idVirtualDataCenter

INTEGER

ID virtual datacenter owner

idVirtualApp

INTEGER

ID virtual app resource owner

idVirtualMachine

INTEGER

ID virtual machine owning the resource

enterpriseName

VARCHAR

Company name resource owner

virtualDataCenter

VARCHAR

Virtual datacenter name resource owner

virtualApp

VARCHAR

Virtual app name resource owner

virtualmachine

VARCHAR

Virtual machine name resource owner

costCode

VARCHAR

Cost code of virtual image. Only valid when the idAccountingResourceType is 1 (virtualmachine-vcpu)

idStorageTier

INTEGER

Code associated with this storage resource's QoS/Tier level. Only valid for the 'External Storage' resource type

costCodeName

varchar(255)

Name of cost code

storageTierName

varchar(40)

Name of storage tier 

idDataCenter

int(11)

ID of datacenter

dataCenterName

varchar(255)

Name of datacenter

idHardwareProfile

int(11)

ID of hardware profile 

idAccountingEvent

bigint(20)

ID of accounting event 

hypervisorType

varchar(255)

Hypervisor type (includes public cloud provider type) 

region

varchar(255)

Name of datacenter or public cloud region 

internal_provider_id

varchar(255)

ProviderID of the resource

account_id

varchar(255)

Optional, can be set with the enterprise property “internal_customer_id”

...

  • Cores

  • RAM

  • Local storage

  • Cost codes (if the VM template has a cost code)

    (warning)Image Added Grouped virtual machine components and virtual machines are accounted per group, not per individual virtual machine.


2. Virtual appliance

  • Groups of virtual machines


    • Cores

    • RAM

    • Local storage

    • Cost codes (if the VM template has a cost code)

      (warning)Image Added Grouped virtual appliances are accounted per group, not per individual virtual appliance.


3. Virtual datacenter

  • Groups of virtual machines

  • Groups of virtual appliances


    • Cores

    • RAM

    • Local storage

    • VLANS

    • Public IPs

    • External storage

      (warning)Image Added Virtual Datacenter accounting is the total of the resources reserved and/or consumed by the Virtual Machines, Virtual Appliances, and users of a Virtual Datacenter.


4. Enterprise
An Enterprise has no managed resources that do not belong to a Virtual Datacenter, so there is no accounting per Enterprise. However, the Enterprise associated with each resource is recorded for aggregating resources at Enterprise level, and this information can be retrieved through the database views.

...

For accounting and billing, Abiquo has previously implemented database views (in both the kinton and kinton_accounting schemas) to help you access the resource usage information correctly. However, the use of these views is no longer recommended for scalability and performance reasons. Instead, use the equivalent queries described above.

**ACCOUNT_PERIOD_USAGE_VW - **Returns the resource use for the accounting period with the maximum values. If the same resource has been used more than once in the same time zone, it takes the greater value. Not grouped by virtual machine and virtual appliance. The columns returned ar the same as the HOURLY_USAGE_MAX_2_VW but the name has been changed to reflect the change to the accounting period.

...