Skip to main content

GCP metrics

Overview

Google Cloud Platform provides built-in monitoring and observability tools that allow users to collect and analyze metrics and traces from their GCP resources. Send Google Cloud metrics and traces seamlessly to Coralogix. Search, analyze, and visualize your data, gaining insights into application behavior, identifying errors, and troubleshooting problems.

For more information about this integration, click here.

How to use with Terraform

To deploy this integration using Terraform, you can use the coralogix_integration resource provided by the Coralogix Terraform provider. Below is an example configuration:

resource "coralogix_integration" "gcp-metrics-collector" {
integration_key = "gcp-metrics-collector"
version = "1.7.0"

parameters = {
IntegrationName = "<IntegrationName>"
MetricPrefixes = [ "compute.googleapis.com", "cloudsql.googleapis.com" ]
ServiceAccountKey = "<ServiceAccountKey>"
}
}

Replace the placeholder values with your actual configuration parameters. Refer to the parameter table below for required fields and their descriptions.

Revisions

Adds two opt-in labels and removes one option. Enable Add instance_name label for metrics with instance_id label to attach an instance_name label to gce_instance metrics that already have an instance_id (requires the roles/compute.viewer permission). Enable Add cloud.region label to attach a cloud.region label, derived from the resource zone, to all metrics. The IncludeSystemLabels option is removed, as it was not adding labels effectively.

NameTypeRequiredDescription
IntegrationNameStringYes
MetricPrefixesListYesTo limit unnecessary API calls that fetch no data but count towards the quota limit, specify only the GCP prefixes of the metrics that actually exist and you want to pull into Coralogix.
ApplicationLabelsListNoSelect labels whose values will be used as the Application Name. If more than one label can be matched, the first match in the list will be used.
ApplicationNameStringNoThe default name of the application that the integration will be used with. This is used as a fallback when no labels match.
BillingProjectIdStringNoA caller-specified project for quota and billing purposes. The caller must have serviceusage.services.use permission on the project.
EnableCloudRegionBooleanNoAdd a cloud.region label, derived from the resource zone, to all collected metrics across every namespace.
EnableInstanceNameBooleanNoRequires roles/compute.viewer permission. Add an instance_name label to metric on a gce_instance.
IncludeUserLabelsBooleanNoInclude user-defined labels in resource metrics. Those metrics will be prefixed with user string.
ProjectIdStringNoThe ID of the GCP project from which metrics should be collected.
ServiceAccountKeyStringNo
ServiceAccountTargetPrincipalStringNoEmail of the created Service Account.
SubsystemLabelsListNoSelect labels whose values will be used as the Subsystem Name. If more than one label can be matched, the first match in the list will be used.
SubsystemNameStringNoThe default name of the subsystem that the integration will be used with. This is used as a fallback when no labels match.
UseRawUserLabelsBooleanNoEmit user-defined labels with their original GCP names instead of prefixing them with user (user. or user_, depending on the metric format). If a raw user-defined label conflicts with an existing metric, resource, system, application, or subsystem label, the existing label is kept and the user-defined label is not emitted.
UserLabelsResourcesListNoChoose which GCP resources should have user-defined labels included in their metrics. Ensure your account has the necessary permissions. Typically, the list permission is required for each selected resource.
Last updated on
Was this page helpful?