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:
Abiquo records when users reserve or use resources in the kinton_accounting DB.
The administrator configures the resources to account and the accounting periods used.
Some accounting procedures are run periodically to consolidate/update resource usage and purge old records.
Configure accounting of resources
To configure accounting of resources:
Check the resources that Abiquo can account
Get the accounting parameters from the accounting database to check their names and their status (enabled or disabled)
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 |
---|---|---|---|---|
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, | 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
| 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 | CPU of each server that has been explicitly reserved for an enterprise. | vCPU | Reservation | Enterprise |
Reserved physical | RAM of each server that has been explicitly reserved for an enterprise. | Megabytes | Reservation | Enterprise |
Repository storage | Repository space is used when:
Abiquo accounts for space used by instances and templates (cases 1 and 2). | Bytes used by each | 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 | Local storage on hypervisor datastores by datastore tiers (including primary and secondary | Bytes used by each disk | Consumption | VM |
Custom | 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.
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.
To change the accounting configuration, see Change the accounting configuration parameters.
The configuration includes the following defaults:The minimum accounting period and granularity will account a minimum of 1 unit per HOUR of usage
The time to keep accounting data is 3 years (of 365 days)
To validate your accounting system, use the Abiquo accounting consistency check. See Abiquo accounting consistency check
And just in case something goes wrong, see How to recover accounting data
If you would like to know what accounting does on weekends, see Check accounting periodic procedures
For template queries to retrieve accounting data, see Retrieve accounting data
For all the nitty gritty details of accounting, see Abiquo accounting architecture
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