Billing

The Basics

Genesis Public Cloud includes billing metrics that can be queried with the CLI, API, and SDK.

Billing information is aggregated every 5 minutes from metrics collected every 30 seconds, and is presented on a per-project basis.

To view a summary of the billing information, we have included a script on your jump host:

./billing_summary.sh

This report summarizes all billing information for a given month with options for grouping and filtering. The help instructions from the command are:

Usage: ./billing_summary.sh <invoice month in YYYYMM> [--groupby <type>] ... [--groupby <type>] [--filter <type>:<value>]
Note: Invoices cover a month according to beginning and end of month date/times in UTC

Example: ./billing_summary.sh 201911
Example: ./billing_summary.sh 201911 --groupby type
Example: ./billing_summary.sh 201911 --groupby display_name
Example: ./billing_summary.sh 201911 --groupby type --groupby flavor_name
Example: ./billing_summary.sh 201911 --groupby time --filter volume_type:gp1
Example: ./billing_summary.sh 201911 --groupby time --filter flavor_name:t5sd.2xlarge --limit 1000

groupby type values:
type
display_name
flavor_id
flavor_name
image_ref
volume_type
instance_id
time

An example of running ./billing_summary.sh 201911 –groupby type:

Project: ABCProject (5e79a78de75c4cbba82bd26d60119ccf)

+--------------------------+---------------------------+---------------------------+-----------------------+--------------------+
| Type                     | Begin                     | End                       |                  Rate |                Qty |
+--------------------------+---------------------------+---------------------------+-----------------------+--------------------+
| floating_ip_in_use_count | 2019-10-31T19:00:00-05:00 | 2019-11-30T18:00:00-06:00 |    0.8086097564999968 | 1416.6750000000002 |
| floating_ip_unused_count | 2019-10-31T19:00:00-05:00 | 2019-11-30T18:00:00-06:00 |     1.579276471666681 | 1537.1583333333333 |
| powered_on_instance      | 2019-10-31T19:00:00-05:00 | 2019-11-30T18:00:00-06:00 |     16.76927522399994 |             4363.4 |
| radosgw.objects.size     | 2019-10-31T19:00:00-05:00 | 2019-11-30T18:00:00-06:00 | 0.0011336218151550487 |  994.4051010131836 |
| router_external_count    | 2019-10-31T19:00:00-05:00 | 2019-11-30T18:00:00-06:00 |    1.0171299599999937 |               1782 |
| volume.size              | 2019-10-31T19:00:00-05:00 | 2019-11-30T18:00:00-06:00 |     4.858367499999953 |             269450 |
+--------------------------+---------------------------+---------------------------+-----------------------+--------------------+

Note

If you run the billing_summary.sh script when logged-in as a Domain Admin, the script will loop through each project in the domain, providing the billing summary for each project.

The Rate is the total dollar amount accumulated for the item. Qty is the sum of the measures for the item.

The Qty value is represented in a Unit-Time format, similar to a power bill, where KiloWatt-Hours is used to represent energy and KiloWatts is power, represented in energy/time. In our case, we have many meters, one for each volume type, flavor, object storage type, etc.

The volume.size item is measured in Unit-Time, where Unit is GiB and Time is 5 minutes. Some examples:

1GiB of storage for 5 minutes -> Qty = 1
2GiB of storage for 5 minutes -> Qty = 2
1GiB of storage for 1 hour (12 x 5-minute intervals) -> Qty = 12

At the most granular level, such as a specific volume, the Qty is multiplied by the price of the item to get the Rate value. For example, if a volume type was chosen for a volume that was priced at $0.10/GiB/month, the pricing is:

$0.10/GiB/730 hours / ((12 x 5-minute-intervals)/1 hour)
or
$0.000011415525114155251141552511415525/GiB/5-minute-interval

For a 100GiB volume of this type that was used for 730 hours (one month), the Qty will be:

730 hours * (12 5-minute-intervals)/1 hour = 8760 5-minute-intervals

and the Rate will be:

100GiB * 8760 5-minute-intervals * ($0.000011415525114155251141552511415525/(GiB*5-minute-interval)) = $10.00