Abiquo accounting services integration

Introduction to Abiquo accounting service

The Abiquo accounting service is a usage metering system. The basic use case is to charge users on a pay per use basis for private cloud resources. The Abiquo accounting service records how much of each resource a tenant uses in a virtual datacenter or datacenter. For example, if a user deploys 5 VMs for a total of 25 hours each, then by default the system will record 125 VM hours during the accounting period. The resources to account are fully configurable and you can also create your own custom resources and queries for managed services. And you can use the Abiquo billing integration to create a file for your billing system and you can display private cloud data on user billing dashboards.

This is a basic technical overview of the Abiquo accounting system:

  1. Abiquo records when users reserve or use resources in the kinton_accounting DB.

  2. The administrator configures the resources to account and the accounting periods used.

  3. Some accounting procedures are run periodically to consolidate/update resource usage and purge old records.

This diagram gives an overview of the main areas of the accounting process.


Configure accounting of resources

To configure accounting of resources:

  1. Check the resources that Abiquo can account

  2. Get the accounting parameters from the accounting database to check their names and their status (enabled or disabled)

  3. Enable or disable resources as required in the accounting database

These steps are described in the following sections.

Description of resources for accounting

Abiquo stores data about the usage of these resources in the Accounting events tables.

Then the Administrator can configure which resources to account in the Accounting event detail table.

The resources shaded in blue in the table are disabled by default.

Accounting resources table

Resource

Description

Unit

Billing type

Association

Resource

Description

Unit

Billing type

Association

Cores

vCPUs in VMs created by users

vCPU

Consumption

VM

Cores ON

vCPUs in VMs deployed and running

vCPU

Consumption

VM

Cores OFF

vCPUs in VMs deployed and stopped

vCPU

Consumption

VM

RAM

RAM in VMs created by users

Megabytes

Consumption

VM

RAM ON

RAM in VMs deployed and running

Megabytes

Consumption

VM

RAM OFF

RAM in VMs deployed and stopped

Megabytes

Consumption

VM

Local storage

Disk space connected to the hypervisor as datastores for VM disks,
including secondary hard disks

Bytes

Consumption

VM

External storage

Disk space for use as external volumes created by users on VMs

Bytes

Reservation

VM/Independent

Public IPs

IP addresses with Internet access for use by VMs

No. of IP addresses

Reservation

VM/Independent

VLANs

Private VLANs for VMs

  • Unmanaged, external and public network VLANs are not accounted

  • A private VLAN is automatically created when a user creates a VDC

No. of VLANs

Reservation

VDC

Firewall

Firewalls created by the user

No. of Firewalls

Reservation

VDC

Load balancer

Load balancers created by the user

No. of Load Balancers

Reservation

VDC

Hypervisor type

The hypervisor type for the VM

HV type

Consumption

VM

Cost code

Optional cost codes for virtual image templates, hardware profiles, and VMs

Cost code

Consumption

VM

Backup

Backup policies applied to VMs deployed

Backup policy

Consumption

VM

Hardware profile

VM Hardware profile

Hardware profile

Consumption

VM

Hardware profile ON

VM Hardware profile in the ON state

Hardware profile

Consumption

VM

Hardware profile OFF

VM Hardware profile in the OFF state

Hardware profile

Consumption

VM

DR protected VM

VM is protected by the disaster recovery service (DRAAS)

True or false

Consumption

VM

HA hosted VM

VM deployed on an Abiquo high-availability rack

True or false

Consumption

VM

Reserved physical
machine cores

CPU of each server that has been explicitly reserved for an enterprise.
Recorded even if the server is not being used.

vCPU

Reservation

Enterprise

Reserved physical
machine RAM

RAM of each server that has been explicitly reserved for an enterprise.
Recorded even if the server is not being used.

Megabytes

Reservation

Enterprise

Repository storage

Repository space is used when:

  • Customers create a VM instance

  • Customers upload disk images into the template repository

  • Abiquo converts instances and templates to other hypervisor formats

Abiquo accounts for space used by instances and templates (cases 1 and 2).
If you wish to account conversions, create a custom metric (case 3).

Bytes used by each
template

Consumption

Enterprise

Anti-affinity VM

VM deployed in an anti-affinity layer separate from other VMs in the same layer

True or false

Consumption

VM

Tiered local
datastore storage

Local storage on hypervisor datastores by datastore tiers (including primary and secondary
non-persistent hard disks) 

Bytes used by each disk

Consumption

VM

Custom

See Custom accounting resource definitions

User defined

User defined

User defined


Key

  •  - Deprecated resource


Get accounting parameters

You can use the ACCOUNTING_CONFIG_VW to view the accounting parameters or you can select directly from the database table.

To get the current accounting parameters, run the query below in kinton_accounting database:

SELECT * FROM accounting_parameters;

The following command output is an example only. You should always use the above command to check the values in your database.

+---------+-------------------------------------+------------+ | idParam | paramName | paramValue | +---------+-------------------------------------+------------+ | 1 | AccountingEnabled | 1 | | 2 | DeleteRegEventsUseSPParam | 0 | | 3 | DeleteRegEventsDeleteHours | 26280 | | 4 | MaximumPeriodsToFirstInit | 1 | | 5 | MaximumPeriodsToProcess | 24 | | 6 | AccountPeriodSize | HOUR | | 7 | AccountPeriodGranularity | HOUR | | 8 | LoggingLevel | INFO | | 9 | VirtualMachine-vcpu | 1 | | 10 | VirtualMachine-vram | 1 | | 11 | VirtualMachine-vhd | 1 | | 12 | VirtualMachine-vtierhd | 1 | | 13 | VirtualMachine-backup | 1 | | 14 | ExternalStorage | 1 | | 15 | IPAddress | 1 | | 16 | VLAN | 1 | | 17 | VirtualMachine-hypervisorType | 1 | | 18 | Firewall | 1 | | 19 | LoadBalancer | 1 | | 20 | VirtualMachine-vcpuon | 1 | | 21 | VirtualMachine-vcpuoff | 1 | | 22 | VirtualMachine-vramon | 1 | | 23 | VirtualMachine-vramoff | 1 | | 24 | VirtualMachine-hp | 1 | | 25 | VirtualMachine-hpon | 1 | | 26 | VirtualMachine-hpoff | 1 | | 27 | draas_protection | 1 | | 28 | VirtualMachine-haHosted | 0 | | 29 | ReservedPhysicalMachine-cpu | 0 | | 30 | ReservedPhysicalMachine-ram | 0 | | 31 | RepositoryStorage | 0 | | 32 | VirtualMachine-antiAffinity | 0 | | 33 | Consolidation-time-sensitivity-secs | 30 | | 1113 | costCode | 1 | +---------+-------------------------------------+------------+

To check the value of a specific accounting parameter, use the query below:

SELECT * FROM accounting_parameters WHERE paramName="PARAM_NAME";

 

How to enable or disable accounting of resources

The resources to use for billing and reporting are stored in the accounting_event_detail table.

To store data for a resource, set the accounting parameter value to 1.

To stop storing data for a resource, set the value to 0.

For example, the VirtualMachine-tierhd accounting resource is disabled by default. To start accounting for VM hard disk storage by datastore tiers, update its value to 1:

 

Accounting resource parameters table

This is a list of the accounting parameters by name and their default value, where 1 is enabled and 0 is disabled.

Parameter name

Default value

VirtualMachine-vcpu

1

VirtualMachine-vcpuon

1

VirtualMachine-vcpuoff

1

VirtualMachine-vram

1

VirtualMachine-vramon

1

VirtualMachine-vramoff

1

VirtualMachine-vhd

1

ExternalStorage

1

IPAddress

1

VLAN

1

Firewall

1

LoadBalancer

1

VirtualMachine-hypervisorType

1

VirtualMachine-backup

1

draas_protection

1

VirtualMachine-haHosted 

0

ReservedPhysicalMachine-cpu

0

ReservedPhysicalMachine-ram

0

RepositoryStorage

0

VirtualMachine-antiAffinity

0

VirtualMachine-tierhd

0

costCode

1


Advanced accounting configuration topics

Here are some advanced accounting topics to further enliven your day.

After you configure Accounting, you can configure the Billing integration to prepare data for billing in CSV or DBMS format

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