...
This tool checks public cloud billing and customer to Abiquo enterprise mapping.
Change history
Version | Module | Description |
---|---|---|
6.0.1 | Both | This tool is now available as part of the Abiquo platform |
6.0.2 | AWS | Allow billing check tool to check keynode enterprises too in AWS. |
6.0.2 | AWS | Billing check tool does not take into account an AWS SPP discount. |
6.0.2 | Both | The seed parameter was removed |
6.1.0 | Azure | Added logging to display which Azure subscriptions are not mapped for an enterprise and which subscriptions that are present in Abiquo are no longer present in the CSP, enterprises without credentials, and subscriptions that are used by more than one enterprise |
Install the tool
You can run this tool on the Abiquo Server.
...
For both providers, add your connection details to the YAML configuration file
Go to
/opt/abiquo-public-cloud-billing-check-tool/config/
Edit the
config.yml
file and complete the values for your system.Code Block language none Abiquo_database: host: localhost user: password: port: 3306 database: kinton socket: /var/lib/mysql/mysql.sock abiquo: api_url: 'http://localhost/api' version: '6.0' user: #Basic Auth credentials password: #OAuth credentials access-token: access-token-secret: consumer-key: consumer-secret:
General usage
The tool has two main commands to run on Azure or AWS.
...
When running the tool on Amazon, you can use the -h
option to print the parameters, as shown here.
Code Block | ||
---|---|---|
| ||
java -jar public-cloud-billing-check-tool.jar aws -h Usage: <main class> aws [-abhvV] [-spp] [-cfp=<configYAMLPath>] [-d=<resellerDiscount>] [-m=<margin>] [-mt=<month>] -r=<rootEnterpriseId> [-y=<year>] Check for AWS organization billing costs and account mappings. -a, --accounts Run the check for accounts inside an organization mapped to abiquo -b, --billing Run check for billing information in Abiquo for the last consolidated billing period -cfp, --configPath=<configYAMLPath> Specify a different path for the config file. Default path is the same where .jar is located -d, --discount=<resellerDiscount> Define the discount necessary to subtract to total cost -h, --help Show this help message and exit. -m, --margin=<margin> Desired margin to compare cost from AWS and Abiquo database. If difference is bigger than margin, it will be considered as an error. Default is 0 -mt, --month=<month> Month of the billing period to check. Default is previous month -r, --rootEnterpriseId=<rootEnterpriseId> Enterprise id of the reseller or key node from which obtain the pricing credentials -spp, --sppDiscount If true, include solution provider program discounts in the price -v, --verbose Display more detailed information about the process execution -V, --version Print version information and exit. -y, --year=<year> Year of the billing period to check. Default is the year of the previous month |
Only The -r
root enterprise option is required and the other parameters are optional.
An example of execution using all parameters will beis: java -jar public-cloud-billing-check-tool.jar aws -a -b -r=1
.
With the "verbose
" option, the tool will display a detailed list of all accounts mapped to Abiquo and the respective enterprises that contain public cloud credentials of each account.
With the "accounts
" option, the tool will check for accounts that are:
Used in more than one enterprise in Abiquo
Mapped to the reseller enterprise hierarchy but not present in the reseller organization
Present in the reseller organization but not present mapped to Abiquo
If "verbose
" is also selected, it will also print all the accounts of the organization.
With the "billing
" option, the the tool will check the difference between AWS cost and Abiquo costs for each mapped account. If "verbose
" is activated, the script will print the difference for all enterprises, otherwise it will only print entries with a cost difference between AWS and Abiquo.
...
Here is an example of the help parameters output. The "-r
" parameter is mandatory.
Code Block |
---|
java -jar public-cloud-billing-check-tool.jar azure -h Usage: <main class> azure [-bhvV] [-azp] [-c=<currencyCode>] [-cfp=<configYAMLPath>] [-d=<resellerDiscount>] [-mepp=<margin><excludedProductIdsPath>] [-mt=<month>] [-m=<margin>] [-mt=<month>] -r=<resellerId> [-y=<year>] [-ep=<excludedPublishers>[,<excludedPublishers>...]]... Check for Azure CSP customer costs and subscription mappings. -azp, --azureplan Run the check for Azure Plan subscriptions in Abiquo with the CSP data -b, --billing Run check for billing information in Abiquo for the last consolidated billing period -c, --currencyCode=<currencyCode> Currency code used to retrieve billing line items, Default code is USD -cfp, --configPath=<configYAMLPath> Specify a different path for the config file. Default path is the same where .jar is located -d, --discount=<resellerDiscount> Define the discount necessary to substract to total cost -ep, --excludedPublishers=<excludedPublishers>[,<excludedPublishers>...] -h, --help Show this help message and exit. -m, --margin=<margin> Desired margin to compare cost from CSP and Abiquo database. If difference is bigger than margin, it will be consideredSpecify Azure publishers to exclude their products -epp, --excludedProductIdsPath=[<excludedProductIdsPath>] Specify a path to a CSV file of Azure product IDs to exclude -h, --help as an error. Default is 0 -mt, --month=<month> Show Monththis ofhelp themessage billing period to check. Default is previous monthand exit. -rm, --resellermargin=<resellerId><margin> Desired margin to compare cost from CSP and Abiquo database. If difference is bigger than margin, it will be considered Enterprise id of the reseller from which obtain the pricing credentials -v, --verbose as Displayan moreerror. detailedDefault information about the process executionis 0 -Vmt, --versionmonth=<month> Month of the billing period to check. PrintDefault versionis information and exit.previous month -yr, --yearreseller=<year><resellerId> Year of the billing period to check. Default is the year of the previous month |
Here is an example of running the tool on Azure using parameters:
Code Block |
---|
java -jar public-cloud-billing-check-tool.jar azure -azpEnterprise -bid -mof 2the -vreseller -r 10 |
And another example:
Code Block |
---|
java -jar /opt/abiquo-public-cloud-billing-check-tool/public-cloud-billing-check-tool.jar azure --azureplan --billing --configPath /home/ansible/config.yml --margin 0 --verbose --discount '0.15' --reseller 3 |
Exclude publishers option
...
from which obtain the pricing credentials
-v, --verbose Display more detailed information about the process execution
-V, --version Print version information and exit.
-y, --year=<year> Year of the billing period to check. Default is the year of the previous month |
Here is an example of running the tool on Azure using parameters:
Code Block |
---|
java -jar public-cloud-billing-check-tool.jar azure -azp -b -m 2 -v -r 10 |
And another example:
Code Block |
---|
java -jar /opt/abiquo-public-cloud-billing-check-tool/public-cloud-billing-check-tool.jar azure --azureplan --billing --configPath /home/ansible/config.yml --margin 0 --verbose --discount '0.15' --reseller 3 |
Exclude publishers option
To exclude products from specific publishers from Azure billing, you can set and Abiquo property: abiquo.azure.billing.parser.lineitem.publisher.ignore
.
This property contains a string of publishers to exclude from billing line items in CSV format, such as Microsoft Office
.
When you are using this property, for the public-cloud-billing-check-tool for Azure, you can use the --excludedPublishers
option.
Exclude product IDs option
To exclude specific products by ID from Azure billing, you can set a new system property "abiquo.azure
.billing.parser.lineitem.publisher.ignore".
This property contains a string of publishers to exclude from billing line items in CSV format. For example "Microsoft Office".
When .billing.parser.lineitem.productid.ignore.path
system property to define a fileystem path to a CSV file containing all the product IDs to ignore.
Effectively, the CSV file will be a list of product IDs to ignore, one per line. When you are using this property, for the public-cloud-billing-check-tool for Azure, you can use the " --epp
or --
excludedPublishers" excludedProductIdsPath
option.
Azure example output
...
A positive number means there are more entitlements in the CSP Azure Plan than there are in Abiquo
A negative number means there are more subscriptions in Abiquo than in the Microsoft Azure portal. This could be because credentials are not set correctly, or because a subscription was deleted/canceledcancelled/deactivated in Azure but the subscription still exists in Abiquo.
...