googlecloudmonitoringreceiver

package module
v0.120.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2025 License: Apache-2.0 Imports: 21 Imported by: 2

README

Google Cloud Monitoring Receiver

Status
Stability alpha: metrics
Distributions contrib
Issues Open issues Closed issues
Code Owners @dashpole, @TylerHelmuth, @abhishek-at-cloudwerx

The primary objective of the Google Cloud Monitoring Receiver is to gather time series metrics data from all Google services and convert this data into a pipeline format that facilitates further use.

This receiver gets GCP (Google Cloud Platform) metrics from GCP Monitoring REST API via the Google SDK for GCP Metrics and then convert those timeseries data into OTel Format Pipeline Data.

Configuration

The following configuration options are supported:

receivers:
  googlecloudmonitoring:
    collection_interval: 2m # Can be specified in seconds (s), minutes (m), or hours (h)
    project_id: my-project-id
    metrics_list:
      - metric_name: "compute.googleapis.com/instance/cpu/usage_time"
      - metric_name: "connectors.googleapis.com/flex/instance/cpu/usage_time"
  • collection_interval (Optional): The interval at which metrics are collected. Default is 300s, minimum is 60s. Be careful of the costs and quotas when setting a low interval.
  • initial_delay (default = 1s): defines how long this receiver waits before starting.
  • timeout: (default = 1m) The timeout of running commands against the GCP Monitoring REST API.
  • project_id (Required): The GCP project ID.
  • metrics_list (Required): A list of services metrics to monitor.

Each single metric can have the following configuration:

  • metric_name (Optional): The specific metric name to collect.
  • metric_descriptor_filter (Optional): Filter for listing metric descriptors. Only support project and metric.type as filter objects.

One of metric_name and metric_descriptor_filter MUST be specified, but MUST not be specified at the same time.

Authentication with Google Cloud

For more details on authentication, refer to the Google Cloud Application Default Credentials documentation. Note that if your workload is running on Google Cloud Platform (GCP), the service account credentials will be used automatically without needing to set the environment variable manually.

Filtering

Metrics Parameters :

  • A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type. For example: metric_name: "compute.googleapis.com/instance/cpu/usage_time"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() receiver.Factory

Types

type Config

type Config struct {
	scraperhelper.ControllerConfig `mapstructure:",squash"`

	ProjectID   string         `mapstructure:"project_id"`
	MetricsList []MetricConfig `mapstructure:"metrics_list"`
}

func (*Config) Validate

func (config *Config) Validate() error

type MetricConfig

type MetricConfig struct {
	MetricName string `mapstructure:"metric_name"`
	// Filter for listing metric descriptors. Only support `project` and `metric.type` as filter objects.
	// See https://cloud.google.com/monitoring/api/v3/filters#metric-descriptor-filter for more details.
	MetricDescriptorFilter string `mapstructure:"metric_descriptor_filter"`
}

func (MetricConfig) Validate

func (metric MetricConfig) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL