CSV billing integration
The CSV billing integration outputs billing usage data in CSV file.
For basic install and configuration instructions, see CSV quickstart.
Install the CSV billing integration
Before you begin:
Prepare a Billing server that can connect to the main Abiquo database
To install Abiquo CSV billing integration, do these steps:
To install the Abiquo billing package, run
yum install abiquo-billing
Note: Abiquo billing now uses Abiquo versionsLog in to the Abiquo database:
Create a user for billing and grant permissions to the user. For example:
CREATE USER 'billing'@'%' IDENTIFIED BY 'mySecureSQLpassword1'; GRANT SELECT,EXECUTE ON kinton.* TO 'billing'@'%'; GRANT SELECT ON mysql.proc TO 'billing'@'%'; GRANT SELECT ON kinton_accounting.* TO 'billing'@'%'; CREATE USER 'billing'@'localhost' IDENTIFIED BY 'mySecureSQLpassword1'; GRANT SELECT,EXECUTE ON kinton.* TO 'billing'@'localhost'; GRANT SELECT ON mysql.proc TO 'billing'@'localhost'; GRANT SELECT ON kinton_accounting.* TO 'billing'@'localhost';
Define the Abiquo enterprises and VDCs that the billing integration should generate usage data for.
Add a record for each enterprise or VDC to the account mapping table.For example, to add mappings for all enterprises you would use the following SQL:
INSERT INTO kinton.billing_account_mapping (idAbiquo, idMappingType, billingAttributeName, billingAttributeValue) (SELECT idEnterprise, 1, 'ENTERPRISE', e.name FROM kinton.enterprise e);
For full details, see Populate the account mapping table for billing.
Later you should create a process to maintain account mappings
Log on to the billing server and go to the folder with the billing.sh script
Edit the billing.properties file
Set the connector_name property to "CSV".
Change the billing init period to "MONTH".
And enter the details of the billing user and IP address to access the Abiquo database.
connector_name=CSV init_period=MONTH dbms_connection_url=jdbc:mysql://<Abiquo Accounting Database IP address>:3306/kinton dbms_jdbc_driver=com.mysql.jdbc.Driver dbms_user=billing dbms_password=mypassword
For full details, see Configure billing properties
To change the resources that are billed, activate or deactivate usages of resources in billing.properties. See below
Edit the csv.properties file
Set the provider_mapping_name property:
For full details of CSV connector configuration, see below
To change the resources that are billed, activate or deactivate usages of resources in csv.properties. See below
To generate the billing data, run
./billing.sh
To check the generated billing data, go to 'CSV_files' folder of the installation directory and display the CSV file
Schedule the billing integration to run automatically. See Abiquo billing integration user guide
Schedule the update of the account mapping table. See Abiquo billing integration user guide
Configure CSV connector properties to define CSV connector behavior
This section contains a detailed description of the properties for configuring the CSV connector's behavior. For example:
CSV file name and location
CSV header
Append or overwrite file
Name of the account attribute holding the billing system account ID
Row per usage, or single row per account
Property | Default | Description |
---|---|---|
csv_file | e.g. csv_file=./csv/Abiquo_Billing{DATE}.csv_
| |
csv_file_header | true |
|
csv_file_append | true |
|
provider_mapping_name | ENTERPRISE | e.g. provider_mapping_name=ZUORA_ACCOUNT_NUMBER
|
include_usage_costs | false | If true, include a 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:
The billing integration does not include charges with independent charging periods:
The billing integration cannot adjust these charging periods to billing periods without risk of calculation error. |
row_per_usage | false | If true, produce one row in the CSV file for each usage per ID per account period. |
datacenter | false | If true, bill per datacenter and include datacenter details in the connector output. |
property | e.g. cpu=true | |
property_display_name | e.g. mem_display_name=RAM MB | |
start_period | true | This mandatory column appears in all reports and it is the timestamp of the start of the accounting period |
Other Columns | Set boolean values to false to exclude these columns from the CSV file | |
end_period | true | If true, include the column containing the timestamp of the end of the accounting period (exclusive) |
abiquo_type | true | If true, include the column containing the 'type' of the Abiquo ID (ENTERPRISE or VDC) |
abiquo_id | true | If true, include the column containing the Abiquo ID value |
bill_system_id | true | If true, include the Billing System's Customer ID, as defined in the 'billing_account_mapping' table |
Configure CSV connector properties to define billing usage data
Example csv.properties
This is a sample file only. Please see the csv.properties file on your billing integration system to check property values.
Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved