## Home

### Note

In Unravel v4.6.1.6, the Billing service is supported only for Databricks. Refer to Billing service.

To configure the billing service, do the following:

1. Configure properties in the file unravel.properties.

Define the following properties in the /usr/local/unravel/etc/unravel.properties file. If a property is not found, then you must add it to the file.

Setting

Property

Description

Billing Report

unravel.billing.enabled

Set this to true to enable the billing service. The default value is false.

Plan

unravel.billing.pricingplan

Set this to any of the following plans:

• pay_as_you_go

unravel.billing.startdate.plan

Specify the start date of the plan in yyyy-mm-dd format. For example: 2021-01-01. The start date must be the first day of the month.

When you add more credit, you must specify a new start date via this property. The new credit takes effect on the new start date. The earliest start date is the month after the current month.

unravel.billing.enddate.plan

Specify the end date of the plan in yyyy-mm-dd format. For example: 2021-01-31.

The end date should be the last day of the month and a date after the start date.

Billing unit

unravel.billing.unit

Set this to any of the following:

• dbu

• instance_hour

For dbu, the cost of a cluster is attributed to the day when the cluster terminates.

When dbu is selected, users need to create a pricing config file (see Create a pricing file that specifies different prices for different workload types.

Pricing

unravel.billing.defaultprice

When unravel.billing.unit=dbu, this property (unravel.billing.defaultprice) specifies the default price in USD for any workload type that is not listed in the pricing config file.

When unravel.billing.unit=instance_hours, this property specifies the price in USD for all instance types.

When this property is not specified, the default value is 0.1 (\$0.10).

You must specify the value with at least one integer and one or two fractional digits. For example, 0.22 or 1.0.

Starting credit

unravel.billing.startingcredit

Only applicable when the plan is unravel.billing.pricingplan=pay_in_advance.

This property specifies the amount of money in USD that the customer pays in advance.

The credits are deducted at the end of each day by the amount that corresponds to the usage (measured in unravel.billing.unit) multiplied by the price per unit.

In the case of DBU, there can be a different price for each workload type, as specified in the pricing config file.

You must specify the value with at least one integer and one or two fractional digits. For example, 0.22 or 1.0.

Email

The following properties must be configured to set up the SMTP to receive the billing reports:

• mail.smtp.port

• mail.smtp.auth

• mail.smtp.starttls.enable

• mail.smtp.user

• mail.smtp.pw

• mail.smtp.host

• mail.smtp.localhost

• mail.smtp.debug

A sample of the Unravel SMTP setup is shown here:

# Sample Unravel SMTP setup:

mail.smtp.port=587
mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.smtp.user=daemon@unraveldata.com
mail.smtp.host=smtp.gmail.com mail.smtp.from=daemon@unraveldata.com
mail.smtp.localhost=unraveldata.com
mail.smtp.debug=true

Unravel email id to send Billing report to. Default is ualert@unraveldata.com. For example:

All the admin users will receive the Billing report. However, to set any user as admin, you can specify the users in a comma-delimited list. For example:

com.unraveldata.report.user.email.domain

Specify the domain name for users who will receive the billing report. For example:

com.unraveldata.report.user.email.domain=unraveldata.com

Here is a sample of the Billing properties in unravel.properties file.

unravel.billing.enabled=true
unravel.billing.startdate.plan=2021-10-01
unravel.billing.enddate.plan=2021-12-31
unravel.billing.unit=dbu
unravel.billing.defaultprice=0.2
unravel.billing.startingcredit=800.0

2. Create a pricing file (only needed if unravel.billing.unit=dbu)

If DBU is used as the billing unit to track Databricks usage, then you must create a pricing file to specify the pre-negotiated price for each workload type, as follows:

1. Navigate to /usr/local/unravel/etc

2. Create a JSON file named dbu_price_usd.json.

Following is a sample JSON file, where the numeric values are the price (in USD) for the corresponding workload types.

{ "light": 0.5, "job compute": 1.2, "all purpose compute": 0.75 }
3. Replace the values in the JSON file as needed.

3. Restart Unravel

After the above steps are completed, use the following command to restart Unravel for these changes to take effect:

sudo /etc/init.d/unravel_all.sh restart