diff --git a/packages/gcp/_dev/build/docs/billing.md b/packages/gcp/_dev/build/docs/billing.md index d1d72fbd773..58214a0c9eb 100644 --- a/packages/gcp/_dev/build/docs/billing.md +++ b/packages/gcp/_dev/build/docs/billing.md @@ -12,6 +12,57 @@ For standard usage cost data, set the table pattern format to `gcp_billing_expor For detailed usage cost data, set the table pattern to `gcp_billing_export_resource_v1`. Detailed tables include the standard fields and additional fields, such as `effective_price`, enabling a more granular view of expenses. +## Requirements + +You need Elasticsearch for storing and searching your data and Kibana for visualizing and managing it. +You can use our hosted Elasticsearch Service on Elastic Cloud, which is recommended, or self-manage the Elastic Stack on your own hardware. + +Before using any GCP integration you will need: + +* **GCP Credentials** to connect with your GCP account. +* **GCP Permissions** to make sure the service account you're using to connect has permission to share the relevant data. + +To collect GCP Billing metrics, the following permissions are required to access the necessary data: + +- `roles/bigquery.dataViewer` +- `roles/bigquery.jobUser` +- `roles/billing.viewer` + +## Configuration Parameters + +### dataset_id + +The `dataset_id` is the unique identifier of your BigQuery dataset where your billing data is stored. You can find this ID in your Google Cloud Console under the BigQuery section. + +### table_pattern + +The `table_pattern` parameter allows you to specify which tables to retrieve from the specified dataset. This can be set to either `gcp_billing_export_v1` for standard usage cost data or `gcp_billing_export_resource_v1` for detailed usage cost data. + +### cost_type + +The `cost_type` parameter enables you to filter the cost data based on specific cost categories. You can select one of the following options: + +- `regular`: This cost type includes all the regular costs associated with your usage of GCP services. This does not include any taxes, adjustments, or rounding errors. + +- `tax`: This cost type includes all the taxes associated with your usage of GCP services. This does not include the regular costs, adjustments, or rounding errors. + +- `adjustment`: This cost type includes any adjustments made to your billing data. Adjustments can include credits, discounts, refunds, or any other modifications to the original costs. + +- `rounding_error`: This cost type includes any rounding errors that occurred when calculating your costs. These are typically very small amounts and are used to reconcile any discrepancies due to rounding. + +## Example Configuration + +Here's an example of what your configuration might look like: + +``` +dataset_id: "my_billing_dataset" +table_pattern: "gcp_billing_export_resource_v1" +project_id: "my_project" +cost_type: "regular" +``` + +In this example, the Agent will pull data from all tables within the `my_billing_dataset` dataset that start with the pattern `gcp_billing_export_resource_v1`. + ## Sample Event {{event "billing"}} diff --git a/packages/gcp/changelog.yml b/packages/gcp/changelog.yml index 646cd3e0d07..2b64c23529b 100644 --- a/packages/gcp/changelog.yml +++ b/packages/gcp/changelog.yml @@ -1,4 +1,9 @@ # newer versions go on top +- version: "2.37.1" + changes: + - description: Improve GCP Billing documentation. + type: enhancement + link: https://github.com/elastic/integrations/pull/9931 - version: "2.37.0" changes: - description: Retain `authenticationInfo.serviceAccountKeyName` data. diff --git a/packages/gcp/docs/billing.md b/packages/gcp/docs/billing.md index 5a62096f61f..fdbf0866fc5 100644 --- a/packages/gcp/docs/billing.md +++ b/packages/gcp/docs/billing.md @@ -12,6 +12,57 @@ For standard usage cost data, set the table pattern format to `gcp_billing_expor For detailed usage cost data, set the table pattern to `gcp_billing_export_resource_v1`. Detailed tables include the standard fields and additional fields, such as `effective_price`, enabling a more granular view of expenses. +## Requirements + +You need Elasticsearch for storing and searching your data and Kibana for visualizing and managing it. +You can use our hosted Elasticsearch Service on Elastic Cloud, which is recommended, or self-manage the Elastic Stack on your own hardware. + +Before using any GCP integration you will need: + +* **GCP Credentials** to connect with your GCP account. +* **GCP Permissions** to make sure the service account you're using to connect has permission to share the relevant data. + +To collect GCP Billing metrics, the following permissions are required to access the necessary data: + +- `roles/bigquery.dataViewer` +- `roles/bigquery.jobUser` +- `roles/billing.viewer` + +## Configuration Parameters + +### dataset_id + +The `dataset_id` is the unique identifier of your BigQuery dataset where your billing data is stored. You can find this ID in your Google Cloud Console under the BigQuery section. + +### table_pattern + +The `table_pattern` parameter allows you to specify which tables to retrieve from the specified dataset. This can be set to either `gcp_billing_export_v1` for standard usage cost data or `gcp_billing_export_resource_v1` for detailed usage cost data. + +### cost_type + +The `cost_type` parameter enables you to filter the cost data based on specific cost categories. You can select one of the following options: + +- `regular`: This cost type includes all the regular costs associated with your usage of GCP services. This does not include any taxes, adjustments, or rounding errors. + +- `tax`: This cost type includes all the taxes associated with your usage of GCP services. This does not include the regular costs, adjustments, or rounding errors. + +- `adjustment`: This cost type includes any adjustments made to your billing data. Adjustments can include credits, discounts, refunds, or any other modifications to the original costs. + +- `rounding_error`: This cost type includes any rounding errors that occurred when calculating your costs. These are typically very small amounts and are used to reconcile any discrepancies due to rounding. + +## Example Configuration + +Here's an example of what your configuration might look like: + +``` +dataset_id: "my_billing_dataset" +table_pattern: "gcp_billing_export_resource_v1" +project_id: "my_project" +cost_type: "regular" +``` + +In this example, the Agent will pull data from all tables within the `my_billing_dataset` dataset that start with the pattern `gcp_billing_export_resource_v1`. + ## Sample Event An example event for `billing` looks as following: diff --git a/packages/gcp/manifest.yml b/packages/gcp/manifest.yml index 89a3f968d50..42b6273ef85 100644 --- a/packages/gcp/manifest.yml +++ b/packages/gcp/manifest.yml @@ -1,6 +1,6 @@ name: gcp title: Google Cloud Platform -version: "2.37.0" +version: "2.37.1" description: Collect logs and metrics from Google Cloud Platform with Elastic Agent. type: integration icons: