collectors

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector interface {
	Collect(timeseriesStart, timeseriesEnd time.Time, projectID string, creds []byte, baseTags circonus.Tags) error
	ID() string
}

Collector interface for gcp metric services.

func New

func New(ctx context.Context, check *circonus.Check, cfgs []GCPCollector, interval time.Duration, logger zerolog.Logger) ([]Collector, error)

New creates a new collector instance.

type Compute

type Compute struct {
	// contains filtered or unexported fields
}

Compute holds definition for the gcp gce collector.

func (*Compute) Collect

func (c *Compute) Collect(timeseriesStart, timeseriesEnd time.Time, projectID string, creds []byte, baseTags circonus.Tags) error

Collect telemetry from gce instance resources in project.

func (*Compute) ID

func (c *Compute) ID() string

type Filter

type Filter struct {
	Labels     map[string]string `json:"labels" toml:"labels" yaml:"labels"`             // filter by labels
	Expression string            `json:"expression" toml:"expression" yaml:"expression"` // filter with a custom expression
}

Filter defines any filtering criteria used for resources and metrics. Use labels, an expression, or neither.

type GCPCollector

type GCPCollector struct {
	Filter   Filter        `json:"filter" toml:"filter" yaml:"filter"`       // filter
	Name     string        `json:"name" toml:"name" yaml:"name"`             // e.g. compute
	Tags     circonus.Tags `json:"tags" toml:"tags" yaml:"tags"`             // service tags
	Disabled bool          `json:"disabled" toml:"disabled" yaml:"disabled"` // disable metric collection for this gcp service
}

GCPCollector defines a generic gcp service metric collector.

func ConfigExample

func ConfigExample() ([]GCPCollector, error)

ConfigExample generates configuration examples for collectors.

Jump to

Keyboard shortcuts

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