Kill Bill OSGI Analytics bundle

Kill Bill Analytics plugin

License

License

GroupId

GroupId

com.ning.billing
ArtifactId

ArtifactId

killbill-osgi-bundles-analytics
Last Version

Last Version

0.5.13
Release Date

Release Date

Type

Type

bundle
Description

Description

Kill Bill OSGI Analytics bundle
Kill Bill Analytics plugin
Project URL

Project URL

http://github.com/killbill/killbill-analytics-plugin
Source Code Management

Source Code Management

http://github.com/killbill/killbill-analytics-plugin/tree/master

Download killbill-osgi-bundles-analytics

Dependencies

provided (4)

Group / Artifact Type Version
com.google.code.findbugs : jsr305 jar 1.3.9
com.ning.billing : killbill-api jar 0.8.1
com.ning.billing.plugin : killbill-plugin-api-notification jar 0.6.3
javax.servlet : javax.servlet-api jar 3.0.1

test (7)

Group / Artifact Type Version
com.jayway.awaitility : awaitility jar 1.3.3
com.ning.billing.commons : killbill-clock test-jar 0.2.11
mysql : mysql-connector-java jar 5.1.22
mysql : mysql-connector-mxj jar 5.0.12
mysql : mysql-connector-mxj-db-files jar 5.0.12
org.mockito : mockito-all jar 1.9.0
org.testng : testng jar 6.3.1

Project Modules

There are no modules declared in this project.

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
7.x.y 0.22.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

Data

To retrieve all data for a given account:

curl -v \
     -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"

Reports

To create a report:

curl -v \
     -X POST \
     -u admin:password \
     -H "X-Killbill-ApiKey:bob" \
     -H "X-Killbill-ApiSecret:lazar" \
     -H 'Content-Type: application/json' \
     -d '{"reportName": "report_accounts_summary",
          "reportType": "COUNTERS",
          "reportPrettyName": "Accounts summary",
          "sourceTableName": "report_accounts_summary",
          "refreshProcedureName": "refresh_report_accounts_summary",
          "refreshFrequency": "HOURLY"}' \
     "http://127.0.0.1:8080/plugins/killbill-analytics/reports"

To retrieve a report configuration by name:

curl -v \
     -u admin:password \
     -H "X-Killbill-ApiKey:bob" \
     -H "X-Killbill-ApiSecret:lazar" \
     "http://127.0.0.1:8080/plugins/killbill-analytics/reports/report_accounts_summary"

To retrieve a report SQL query:

curl -v \
     -u admin:password \
     -H "X-Killbill-ApiKey:bob" \
     -H "X-Killbill-ApiSecret:lazar" \
     "http://127.0.0.1:8080/plugins/killbill-analytics/reports?name=report_accounts_summary&startDate=2018-01-01&endDate=2018-05-01&sqlOnly=true"

To retrieve report data:

curl -v \
     -u admin:password \
     -H "X-Killbill-ApiKey:bob" \
     -H "X-Killbill-ApiSecret:lazar" \
     "http://127.0.0.1:8080/plugins/killbill-analytics/reports?name=report_accounts_summary&startDate=2018-01-01&endDate=2018-05-01&smooth=SUM_WEEKLY&format=csv"

Healthcheck

Status:

curl -v \
     -u admin:password \
     "http://127.0.0.1:8080/plugins/killbill-analytics/healthcheck"

Put out of rotation:

curl -v \
     -X DELETE \
     -u admin:password \
     "http://127.0.0.1:8080/plugins/killbill-analytics/healthcheck"

Put in rotation:

curl -v \
     -X PUT \
     -u admin:password \
     "http://127.0.0.1:8080/plugins/killbill-analytics/healthcheck"
com.ning.billing

Kill Bill

Kill Bill has been the leading open-source platform for billing and payment since 2010.

Versions

Version
0.5.13
0.5.12
0.5.11
0.5.10
0.5.9
0.5.8
0.5.7
0.5.6
0.5.5
0.5.4
0.5.3
0.5.2
0.5.1
0.5.0
0.4.5
0.4.4
0.4.3
0.4.2
0.4.1
0.4.0
0.3.6
0.3.5
0.3.4
0.3.3
0.3.2
0.3.1
0.3.0
0.2.2
0.2.1
0.2.0
0.1.80
0.1.79
0.1.78
0.1.77
0.1.76
0.1.75
0.1.74
0.1.73
0.1.72
0.1.71
0.1.70
0.1.69
0.1.68
0.1.67
0.1.66
0.1.65
0.1.64