Plugin to compute business and financial reports
Java JavaScript PLSQL CSS HTML Shell Other
Switch branches/tags
killbill-osgi-bundles-analytics-0.5.13 killbill-osgi-bundles-analytics-0.5.12 killbill-osgi-bundles-analytics-0.5.11 killbill-osgi-bundles-analytics-0.5.10 killbill-osgi-bundles-analytics-0.5.9 killbill-osgi-bundles-analytics-0.5.8 killbill-osgi-bundles-analytics-0.5.7 killbill-osgi-bundles-analytics-0.5.6 killbill-osgi-bundles-analytics-0.5.5 killbill-osgi-bundles-analytics-0.5.4 killbill-osgi-bundles-analytics-0.5.3 killbill-osgi-bundles-analytics-0.5.2 killbill-osgi-bundles-analytics-0.5.1 killbill-osgi-bundles-analytics-0.5.0 killbill-osgi-bundles-analytics-0.4.5 killbill-osgi-bundles-analytics-0.4.4 killbill-osgi-bundles-analytics-0.4.3 killbill-osgi-bundles-analytics-0.4.2 killbill-osgi-bundles-analytics-0.4.1 killbill-osgi-bundles-analytics-0.4.0 killbill-osgi-bundles-analytics-0.3.6 killbill-osgi-bundles-analytics-0.3.5 killbill-osgi-bundles-analytics-0.3.4 killbill-osgi-bundles-analytics-0.3.3 killbill-osgi-bundles-analytics-0.3.2 analytics-plugin-6.0.0 analytics-plugin-5.1.4 analytics-plugin-5.1.3 analytics-plugin-5.1.2 analytics-plugin-5.1.1 analytics-plugin-5.1.0 analytics-plugin-5.0.6 analytics-plugin-5.0.5 analytics-plugin-5.0.4 analytics-plugin-5.0.3 analytics-plugin-5.0.2 analytics-plugin-5.0.1 analytics-plugin-5.0.0 analytics-plugin-4.2.5 analytics-plugin-4.2.4 analytics-plugin-4.2.3 analytics-plugin-4.2.2 analytics-plugin-4.2.1 analytics-plugin-4.2.0 analytics-plugin-4.1.0 analytics-plugin-4.0.5 analytics-plugin-4.0.4 analytics-plugin-4.0.3 analytics-plugin-4.0.2 analytics-plugin-4.0.1 analytics-plugin-4.0.0 analytics-plugin-3.0.2 analytics-plugin-3.0.1 analytics-plugin-3.0.0 analytics-plugin-2.0.3 analytics-plugin-2.0.2 analytics-plugin-2.0.1 analytics-plugin-2.0.0 analytics-plugin-1.0.3 analytics-plugin-1.0.2 analytics-plugin-1.0.1 analytics-plugin-1.0.0 analytics-plugin-0.8.0 analytics-plugin-0.7.2 analytics-plugin-0.7.1 analytics-plugin-0.7.0 analytics-plugin-0.6.0
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

Analytics plugin

Kill Bill plugin to provide business analytics and reporting capabilities. You can find the documentation here.

Release builds are available on Maven Central with coordinates org.kill-bill.billing.plugin.java:analytics-plugin.

Kill Bill compatibility

Plugin version Kill Bill version
1.x.y 0.14.z
3.x.y 0.16.z
4.x.y 0.18.z
5.x.y 0.19.z
6.x.y 0.20.z

Requirements

The plugin needs a database. The latest version of the schema can be found here.

Setup

Default dashboards rely on reports that need to be installed by running the seed_reports.sh script.

By default, the views will use the converted amount columns when applicable, which require the analytics_currency_conversion table to be populated with currency conversion rates. If you are only using one currency, use the non-converted columns instead (next_mrr instead of converted_next_mrr for example).

When configuring refreshes via stored procedures, make sure to bump the connection timeout accordingly (org.killbill.billing.osgi.dao.connectionTimeout), as it will be used to set the read and query timeouts.

API

To retrieve all data for a given account:

curl -u admin:password \
     -H "X-Killbill-ApiKey:bob" \
     -H "X-Killbill-ApiSecret:lazar" \
     "http://127.0.0.1:8080/plugins/killbill-analytics/<ACCOUNT_ID>"

To force a refresh:

curl -v \
     -X PUT \
     -u admin:password \
     -H "X-Killbill-ApiKey:bob" \
     -H "X-Killbill-ApiSecret:lazar" \
     "http://127.0.0.1:8080/plugins/killbill-analytics/<ACCOUNT_ID>"

To refresh all accounts:

curl -s \
     -u admin:password \
     -H "X-Killbill-ApiKey:bob" \
     -H "X-Killbill-ApiSecret:lazar" \
     "http://127.0.0.1:8080/1.0/kb/accounts/pagination" | \
ruby -r json -e 'JSON.parse(gets).map { |a| puts a["accountId"] }' | \
xargs -I accountId \
curl -v \
     -X PUT \
     -u admin:password \
     -H "X-Killbill-ApiKey:bob" \
     -H "X-Killbill-ApiSecret:lazar" \
    "http://127.0.0.1:8080/plugins/killbill-analytics/accountId"