`billing` metricset is designed for collecting billing metrics from Google Cloud
BigQuery daily cost detail table. BigQuery is a fully-managed, serverless data
warehouse.
Cloud Billing export to BigQuery enables you to export detailed Google Cloud
billing data (such as usage, cost estimates, and pricing data) automatically
throughout the day to a BigQuery dataset that you specify. Then you can access
your Cloud Billing data from BigQuery for detailed analysis using Metricbeat.
Please see https://cloud.google.com/billing/docs/how-to/export-data-bigquery[export
cloud billing data to BigQuery] for more details on how to export billing data.

In BigQuery dataset, detailed Google Cloud daily cost data is loaded into a data
table named `gcp_billing_export_v1_<BILLING_ACCOUNT_ID>`. There is a defined
schema for Google Cloud daily cost data that is exported to BigQuery. Please see
https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#data-schema[
daily cost detail data schema] for more details.

[float]
=== Metricset-specific configuration notes
* *dataset_id*: (Required) Dataset ID that points to the top-level container which contains
the actual billing tables.
* *table_pattern*: (Optional) Daily cost detail billing table name prefix.
Default to `gcp_billing_export_v1`.
* *cost_type*: (Optional) The type of cost this line item represents: regular,
tax, adjustment, or rounding error. Default to `regular`.

[float]
=== Configuration example
[source,yaml]
----
- module: googlecloud
  metricsets:
    - billing
  period: 24h
  project_id: "your project id"
  credentials_file_path: "your JSON credentials file path"
  dataset_id: "dataset id"
  table_pattern: "table pattern"
  cost_type: "regular"
----
