Abiquo Documentation Cookies Policy

Our Documentation website uses cookies to improve your experience. Please visit our Cookie Policy page for more information about cookies and how we use them.


Documentation

Skip to end of metadata
Go to start of metadata

 

Changes to CSV Billing Integration in Abiquo 3.10

In Abiquo 3.10, pricing per datacenter was added to the main product. To bill per datacenter for CSV format, set the following property to true:

  • datacenter

The following new usage options were added in Abiquo 3.10

  • cpu_on
  • cpu_off
  • mem_on
  • mem_off
  • firewall
  • loadbalancer
  • local_tier_storage_usage with storage tier names as local_tier_storage_X

 

CSV Connector

This section covers specific configuration of the Abiquo Billing Integration for the CSV Connector. Remember to first follow the instructions to configure the Abiquo Billing Integrator in Abiquo Billing Integration User Guide.

The CSV connector is a generic connector which aggregates usage data into one or more CSV files stored locally in the Abiquo Billing Integration system's file system. The connector provides numerous flexible options to control the content of the CSV file. It is primarily aimed at third-party systems that are able to read the billing data in a generic CSV format, thus removing the need for a custom billing connector.

Configure CSV Connector

Create CSV Account Mapping

The CSV connector requires you to create account mappings in the 'billing_account_mapping' table. The CSV Connector allows you to specify the name of the mapping attribute from which the the Customer ID is obtained. See #provider_mapping_name

Configure the CSV Connector behavior

PropertyDefaultRangeDescription
csv_file
  e.g. csv_file=./csv/Abiquo_Billing{DATE}.csv_
This setting allows you to specify the location and name of the CSV file to be generated. Note that the CSV Connector will attempt to create any file directories specified in the file path. Also note the special placeholder {DATE}. The CSV connector will replace any instance of this string in the file path (including directories) with the date that the Billing Integration was started, in the form 'YYYYMMDD', e.g. '20111220' if run on 20 December 2011.
csv_file_header

 true

true, false

Determines whether the CSV Connector will write a list of column names to the top of an empty CSV file.

csv_file_append
 truetrue, false Determines whether the CSV Connector appends (true) to the current file if it exists, or replaces an existing file (false).
provider_mapping_name

ENTERPRISE

 

e.g. provider_mapping_name=ZUORA_ACCOUNT_NUMBER
This is the name of the billing attribute name (defined in the billing_account_mapping table) which the CSV connector will obtain the Billing System customer ID from.

include_usage_costs

false

true, false

Include usage costs for a pricing template. When set to true, the CSV connector will include additional costing columns in its output, with one additional column for each usage defined in the pricing template. Values that are not defined in the pricing templates are not covered by billing when including usage costs:

  • 'external storage' usage does not include costings; these should be costed via storage tier usage.
  • hypervisor
  • custom usages

Values that have charging periods independent of the billing charge period are not covered by billing:

  • minimum charge
  • standing charge

This is because the charging periods cannot be adjusted to the billing periods without risk of calculation error.

row_per_usage

false

true, false

If true, the CSV Connector produces one row in the CSV file for each usage per ID per account period. If false, place all usages for an id-account period pair on a single row.

datacenter

false

true, falseIf Physical Datacenter Billing per Abiquo Datacenters is enabled in the billing.properties file, it must also be enabled in the associated Billing Connector. This property will include datacenter details in the connector output. Note: If this value is enabled but Physical Datacenter Billing by Abiquo Datacenter is not enabled in billing.properties, then datacenter details will be recorded as ‘n/a’.
For pricing per datacenter, set this option to true 
Configure CSV Columns and Customize Column Headers

You can include or exclude CSV columns with the properties described in the following sections. Just set the properties to true to include the column, for example:

cpu=true
vlan=true

You can customize column headers by using the "..._display_name" property. This will override the standard column headers or the "Abiquo Type" column values in "row per usage" CSV files. These additional properties apply to all usage entries except custom usages, which already have custom names.

In general, customized display names can be values such as strings or account numbers, for example:

mem_display_name=RAM MB
vlan_display_name=1010101

For example, mappings of CPU usages to Aria usage IDs:

cpu_display_name=10179063
cost_code_1_display_name=10179086 
storage_tier_1_display_name=10179091
Include or exclude CSV Columns with Billing Details

The following properties are optional boolean values to indicate which columns are included in the CSV file output. The only mandatory column is the 'Start Period' column. By default, all columns are included. These properties can have values of true or false.

PropertyDefaultDescription
start_period

true

Mandatory column. Timestamp of the start of the accounting period
end_period

true

Timestamp of the end of the accounting period (exclusive)

abiquo_type

true

The 'type' of the Abiquo ID (ENTERPRISE or VDC)

abiquo_id

true

The Abiquo ID value

bill_system_id

true

The Billing System's Customer ID, as defined in the 'billing_account_mapping' table

Include or exclude CSV Columns with Usage Data

The following properties are optional boolean values to indicate which columns are included in the CSV file output. By default, all columns are included. These properties can have values of true or false.

Note that by default all quantities are per accounting period, which by default is 1 hour. So for example, a 1 CPU VM running for the full 24 hours of a DAY Accounting period will consume a quantity of 24 CPUs.

PropertyDefaultDescription
cpu
true

Quantity of CPU for the account period

cpu_on
trueQuantity of CPU for the account period during which the VM was ON
cpu_off
trueQuantity of CPU for the account period during which the VM was OFF
mem
true

Quantity of Memory for the account period (MB)

mem_on
trueQuantity of Memory for the account period during which the VM was ON
mem_off
trueQuantity of Memory for the account period during which the VM was OFF
ip
true

Quantity of IPs used for the account period

vlan
true

Quantity of VLANs used for the account period

local_storage
true

Quantity of Local Storage used for the Account Period (GB)

external_storage
true

Quantity of External Storage used for the account period (GB)

ha
trueVirtual machine hosted on an Abiquo rack with high availability enabled
reserved_server_cpu
trueQuantity of CPU in reserved servers that have been explicitly reserved for an Enterprise
reserved_server_memory
trueQuantity of RAM in reserved servers that have been explicitly reserved for an Enterprise
repository
trueRepository usage (GB) by the enterprise for VM Templates and Instances (conversions are not accounted)
anti_affinity
trueVirtual machine deployed in anti-affinity layer to ensure it is deployed separately from other virtual machines in the same layer
firewall
trueNumber of firewalls
loadbalancer
trueNumber of load balancers
Configure CSV Storage Tiers for External Storage

The CSV Connector can optionally include Storage Tier usages that have been defined in the billing.properties file for volumes on external managed storage.

PropertyDefaultRangeDescription
tiered_storage
falsetrue, falseEnable processing of tiered storage that has been defined in the billing properties file. You must then define the Storage Tiers that you want to include in the CSV file, in the order you wish those custom columns to appear.
storage_tier_<n>
  Defines a storage tier with a number <n>, which is an incrementing number from 1 that defines the order of the tiers in the CSV file. This storage tier must be defined in the billing.properties file with the same name as defined in the following name property.
storage_tier_<n>_name
  The value assigned to the setting MUST be the same (case sensitive) name as defined for the 'storage_tier_<n>_name' in the billing.properties file
storage_tier_<n>_display_name
   Custom column heading
Configure CSV Datastore Local Tiered Storage Tiers

The CSV Connector can optionally include Datastore service level usages that have been defined in the billing.properties file for datastores included in datastore tiers.

PropertyDefaultRangeDescription
local_tier_storage
falsetrue, falseEnable processing of datastore tiers that have been defined in the billing properties file. You must then define the datastore tiers that you want to include in the CSV file, in the order you wish those custom columns to appear.
local_tier_storage_<n>
  Defines a datastore tier with a number <n>, which is an incrementing number from 1 that defines the order of the tiers in the CSV file. This datastore tier must be defined in the billing.properties file with the same name as defined in the following name property.
local_tier_storage_<n>_name
  The value assigned to the setting MUST be the same (case sensitive) name as defined for the 'local_tier_storage_<n>_name' in the billing.properties file
storage_tier_<n>_display_name
  Custom column heading
Configure CSV Cost Code

The CSV Connector can optionally include Cost Code usages that have been defined in the billing.properties file.

PropertyDefaultRangeDescription
cost_codes
falsetrue, falseEnable processing of cost code that have been defined in the billing properties file. You must then define the Cost Codes that you want to include in the CSV file, in the order you wish those cost codes to appear.
cost_code_<n>
  Defines a cost code with a number <n>, which is an incrementing number from 1 that defines the order of appearance of the cost codes in the CSV file. This cost code must be defined in the billing.properties file with the same name as defined in the following name property.
cost_code_<n>_name
  The value assigned to the setting MUST be the same (case sensitive) name as defined for the 'cost_code_<n>_name' in the billing.properties file.
cost_code_<n>_display_name
  The customized display names can be values such as strings or account numbers, for example:
  • cost_code_1_display_name = LINUX1
  • cost_code_2_display_name = WINDOWS10

Note that these settings work in that same way as the settings defined for billing.properties - please see that section for details.

Configure CSV Hypervisors

The CSV Connector can optionally include Hypervisor usages that have been defined in the billing.properties file.

PropertyDefaultRangeDescription
hypervisors
falsetrue, falseEnable processing of hypervisor usage that has been defined in the billing properties file.
hypervisor_<n>
  Defines a hypervisor with a number <n>, which is an incrementing number from 1 that defines the order of the hypervisors in the CSV file. This hypervisor must be defined in the billing.properties file with the same name as defined in the following name property.
hypervisor_<n>_name
  The value assigned to the setting MUST be the same (case sensitive) name as defined for the 'hypervisor_<n>_name' in the billing.properties file so the Billing integration can identify it.
hypervisor_<n>_display_name
   

Example of hypervisor properties

hypervisors=true 
hypervisor_1_name=VMX_04 
# Optional override of names, if required... 
hypervisor_1_display_name=VMWareESX 

 

Configure Custom Usage in CSV

The CSV connector will optionally include 'Custom' usages defined in the Billing Integration's billing.properties file. In order to process custom usages in the CSV connector, you must first define the following setting in csv.properties: custom=true

custom

You must then define the Custom Usages that you want to include in the CSV file, in the order you wish those custom columns to appear. This is done by creating csv.properties entries named 'custom_<n>', where <n> is an incrementing number from 1. The value assigned to the setting MUST be the same (case sensitive) name as defined for the the 'custom_usage_<n>_name' in the billing.properties file.

An example csv.properties file entry might be:

custom_1=ESXHypervisors

Assuming that 'ESXHypervisors' is defined as the name of a Custom usage in billing.properties. Note that the custom <n> number in billing.properties does not have to match the <n> number in csv.properties.

Example csv.properties

This is a sample file only. Please see the csv.properties file on your billing integration system to check property values.

##############
#
# CSV Connector specific properties
#
##############
# define the name of the CSV file 
csv_file=./CSV_files/abiquo_billing_{DATE}.csv

# Should we write a header row to the CSV?
csv_file_header=true

# Append to an existing file (if it exists), or replace it?
csv_file_append=true

# name of the billing system property name to use as the CSV customer ID value
provider_mapping_name=ENTERPRISE

# Should we include usage costings in the CSV output?
include_usage_costs=false

# determines whether we have one row per usage, or put all usages on a single row...
row_per_usage=false

# what optional information is required to qualify the billing data? 
# Set datacenter to true for billing with pricing per datacenter
datacenter=true
end_period=true
abiquo_type=true
abiquo_id=true
bill_system_id=true

# These values determine whether particular usages will be included in the results
# Invalid Usages will be reported as 0 value...
cpu=true
mem=true
ip=true
vlan=true
local_storage=true
external_storage=true
ha=false
reserved_server_cpu=false
reserved_server_memory=false
repository=false
anti_affinity=false
firewall=true
loadbalancer=true

tiered_storage=false
#storage_tier_1=false
#storage_tier_2_name=Tier 2
#storage_tier_3=false
#storage_tier_4=false

# Only need to include the cost codes that are required in the CSV file
cost_codes=false
#cost_code_1=true
#cost_code_1_name=Monowall


# Only need to include the hypervisor usages that are required in the CSV file
# Optional - the entries below have been overriden to use 'friendly' names
hypervisors=false
hypervisor_1=false
hypervisor_1_name=VMX_04
hypervisor_1_display_name=VMWareESXi
hypervisor_2=false
hypervisor_2_name=KVM
hypervisor_3=false
hypervisor_3_name=ORACLE_VM
hypervisor_3_display_name=OracleVM
hypervisor_4=false
hypervisor_4_name=XENSERVER
hypervisor_4_display_name=XenServer
hypervisor_5=false
hypervisor_5_name=HYPERV_301
hypervisor_5_display_name=HyperV
hypervisor_6=false
hypervisor_6_name=AMAZON
hypervisor_6_display_name=AmazonAWS


# Include datacenter details in connector output for billing by datacenter subgroups and datacenter filtering
# Note: if this value is enabled without Physical Datacenter being enabled in billing.properties,
# then datcenter details will be recorded as 'n/a'
datacenter=true
 
# Only need to include the custom usages that are required in the CSV file
custom=false
custom_1=false
custom_1_name=RepositoryUsageGB