Abiquo billing integration user guide






Changes to billing

See Changes to Abiquo billing integration 


Overview of  Abiquo billing integration

Abiquo billing integration can process Abiquo accounting data and provide it to a third party billing system to generate customer invoices for Abiquo usage.

The billing integration is a separate stand-alone utility. You should install it on a machine independent of other Abiquo software. It comprises the following components.

  • Core billing utility: calculates the usage data and manages it on a 'per account' basis

  • Billing connector: takes the 'usage' data from the core billing utility and provides it to a third-party billing system.

There are two billing connectors

  • CSV: generates CSV files with Abiquo usage data

  • DBMS: populates a database table in any suitable MySQL database with Abiquo usage data. 

 Abiquo billing integration
Abiquo billing integration

 

After you configure billing, set up separate processes to:

  • Run the billing integration on a regular basis, e.g. with a weekly scheduled task

  • Maintain the mappings between Abiquo entities and the billing account IDs


Install and configure the billing integration 

To install and configure the billing integration, see the page for the output format of your billing data: 

 


 

Schedule the billing integration to run automatically

To generate billing data at regular intervals, e.g. weekly, schedule the billing integration to run using a program such as cron.

If you are using cron, set the script's current working directory correctly in your cron job.

For example, if the Abiquo Billing Integration is in the '/opt/abiquo-billing' folder, then your crontab entry command could look like this:

0 1 * * * root cd /opt/abiquo-billing; /bin/bash /opt/abiquo-billing/billing.sh 2>&1 | tee --append /var/log/billing.log

Note that the billing integration automatically tracks which data it has processed for each account, so it should not process usage data more than once.

 


Schedule the billing integration to update the account mapping table

To maintain the account mapping table, you can create a cron job which runs before billing cron job. 

For example:

10 0 * * * root mysql --host specifythedbhost --user root --password yourpass --execute "INSERT IGNORE INTO kinton.billing_account_mapping (idAbiquo, idMappingType, billingAttributeName, billingAttributeValue) (SELECT idEnterprise, 1, 'ENTERPRISE', e.name FROM kinton.enterprise e);"

 


 

Sample billing.properties file

This is a sample file only, please use the files provided with your billing integration.

############## # # Billing specific properties # ############## # Set granularity for processing Usage data account_period=HOUR # Convert usage units be converted to 'per hour' units (true) or use the accounting granularity (false) usage_units_per_hour=false # Try to get usage data for this period for any 'new' account. If not supplied, the default is the account_period init_period=DAY # Set the period of the bill, for example, a value of 15 means from 15/MM/YYYY to 15/MM+1/YYYY bill_day_of_month=1 # Define the connector to use. Currently we support 'CSV' and 'DBMS' connector_name=CSV # Or you can Specify a class explicitly if no connector_name is supplied: #connector_class=com.abiquo.billing.connectors.csv.CSVConnector #connector_class=com.abiquo.billing.connectors.dbms.DBMSConnector # DBMS settings for reading the usage data and account mapping info: # local connection dbms_connection_url=jdbc:mysql://localhost/kinton dbms_connection_url=jdbc:mysql://sacedo40.bcn.abiquo.com:3306/kinton dbms_jdbc_driver=com.mysql.jdbc.Driver dbms_user=billing dbms_password=myPassword # Group billing data by physical Datacenter? dc_grouping=true # Filtering options to limit the datacenters included for billing: dc_filtering=false dc_include_filter_1=London #dc_include_filter_2=New York # A job ID for this Billing process. Only required if concurrent billing processes are required. # Default id value is 1 #job_id=1 # Collect core usage counters configured below by consumption # or by the hard limit allocation for the Enterprise/VDC # The default is false (i.e. collect by consumption) #allocation_usages=true # Core usage enable/disable settings vm_usage=false vm_on_usage=false vm_off_usage=false cpu_usage=true cpu_on_usage=false cpu_off_usage=false memory_usage=true memory_on_usage=false memory_off_usage=false local_storage_usage=true ip_usage=true vlan_usage=true external_storage_usage=true ha_usage=false reserved_server_cpu_usage=false reserved_server_memory_usage=false repository_usage=false anti_affinity_usage=false firewall_usage=false loadbalancer_usage=false hardwareprofile_usage=false hardwareprofile_onoff_usage=false # Tiered Storage Usages tiered_storage_usage=false #storage_tier_1=false #storage_tier_2=false #storage_tier_2_name=Tier 2 <--- Configure the non-default Tier names, if required... #storage_tier_3=false #storage_tier_4=false # Local Tiered Storage Usages local_tier_storage_usage=false #local_tier_storage_1=false #local_tier_storage_2=false #local_tier_storage_2_name=Tier 2 <--- Configure the non-default Tier names, if required... #local_tier_storage_3=false #local_tier_storage_4=false # backup Usages backup_usage=false #backup_policy_1=false #backup_policy_2=false #backup_policy_2_code=Backup 2 <--- Configure the Policy code #backup_policy_3=false #backup_policy_4=false # DRaaS usage draas_protection_usage=false # Cost Code usages cost_code_usage=false #cost_code_1_name=Monowall # Hypervisor usages (all disabled by default) hypervisor_usage=false hypervisor_1=false hypervisor_1_name=VMX_04 hypervisor_2=false hypervisor_2_name=KVM hypervisor_3=false hypervisor_3_name=ORACLE_VM hypervisor_4=false hypervisor_4_name=XENSERVER hypervisor_5=false hypervisor_5_name=HYPERV_301 hypervisor_6=false hypervisor_6_name=AMAZON # Custom Usage example (disabled by default) custom_usage=false custom_1=false custom_1_name=RepositoryUsageGB custom_1_ent_sql=SELECT SUM(d.diskFileSize)/(1048576*1024) FROM kinton.enterprise e JOIN kinton.virtualimage vi ON (e.idEnterprise=vi.idEnterprise) JOIN disk d on (vi.idImage = d.template_id) WHERE d.stateful=false AND e.idEnterprise={ABQ_ENTERPRISE_ID}; custom_1_vdc_sql=

 

 

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