You can get up-to-date billing graphs throughout the day, and use labels to slice and dice your GCP bill the way you want by combining Google Cloud Platform billing export to BigQuery functionality with Google Data Studio.
Export your billing data to BigQuery
To start exporting your billing data into a BigQuery dataset, follow the procedure in Export Billing Data to BigQuery. After you follow the procedure, it takes about a day for the dataset to begin to be populated with billing data. (You might see some network egress first, then some VM charges, then Cloud Pub/Sub usage, and so on.) After you've got data in your dataset, you can run queries against it, as shown below.
Start working with the sample billing report
To see and copy the sample billing report:
- Open the Billing Report Demo.
- In the left navigation pane, click READ ME for steps to copy and use the report with your data.
Slice and dice your billing reports using labels
You can use labels to answer complex questions, such as "How can I tell what Service X is costing me?", or "What am I spending on my development environments versus production?" You apply labels, which are key/value pairs, to your GCP resources. Common uses of labels include:
- Labels based on team or cost center. You can use these labels to distinguish
projects owned by different teams, which is useful in cost accounting or
budgeting. For example,
- Labels based on component. For example,
- Labels based on environment or stage. For example,
For additional information about labels, read Labelling and grouping your Google Cloud resources.
The example report and dataset uses three project labels (project.labels.key) to demonstrate visualizing data by project label:
- team label is used to populate the respective charts and filters for costs by team.
- service label is used to populate the respective charts and filters for costs by Google Cloud service type (for example, compute, storage, and more).
- env label is used to populate the respective charts and filters for costs distributed by environment (for example, prod, dev, and more).