cloudwatch

package
v0.40.3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToYACE

func ConvertToYACE(a Arguments) (yaceConf.ScrapeConf, error)

ConvertToYACE converts the river config into YACE config model. Note that the conversion is not direct, some values have been opinionated to simplify the config model the agent exposes for this integration.

Types

type Arguments

type Arguments struct {
	STSRegion             string                `river:"sts_region,attr"`
	FIPSDisabled          bool                  `river:"fips_disabled,attr,optional"`
	Debug                 bool                  `river:"debug,attr,optional"`
	DiscoveryExportedTags TagsPerNamespace      `river:"discovery_exported_tags,attr,optional"`
	Discovery             []DiscoveryJob        `river:"discovery,block,optional"`
	Static                []StaticJob           `river:"static,block,optional"`
	DecoupledScrape       DecoupledScrapeConfig `river:"decoupled_scraping,block,optional"`
}

Arguments are the river based options to configure the embedded CloudWatch exporter.

func (*Arguments) SetToDefault

func (a *Arguments) SetToDefault()

SetToDefault implements river.Defaulter.

type DecoupledScrapeConfig added in v0.36.0

type DecoupledScrapeConfig struct {
	Enabled bool `river:"enabled,attr,optional"`
	// ScrapeInterval defines the decoupled scraping interval. If left empty, a default interval of 5m is used
	ScrapeInterval time.Duration `river:"scrape_interval,attr,optional"`
}

DecoupledScrapeConfig is the configuration for decoupled scraping feature.

type Dimensions

type Dimensions map[string]string

Dimensions are the label values used to identify a unique metric stream in CloudWatch. Each key value pair in the dictionary corresponds to a label value pair.

type DiscoveryJob

type DiscoveryJob struct {
	Auth                      RegionAndRoles `river:",squash"`
	CustomTags                Tags           `river:"custom_tags,attr,optional"`
	SearchTags                Tags           `river:"search_tags,attr,optional"`
	Type                      string         `river:"type,attr"`
	DimensionNameRequirements []string       `river:"dimension_name_requirements,attr,optional"`
	Metrics                   []Metric       `river:"metric,block"`
	NilToZero                 *bool          `river:"nil_to_zero,attr,optional"`
}

DiscoveryJob configures a discovery job for a given service.

type Metric

type Metric struct {
	Name       string        `river:"name,attr"`
	Statistics []string      `river:"statistics,attr"`
	Period     time.Duration `river:"period,attr"`
	Length     time.Duration `river:"length,attr,optional"`
	NilToZero  *bool         `river:"nil_to_zero,attr,optional"`
}

type RegionAndRoles

type RegionAndRoles struct {
	Regions []string `river:"regions,attr"`
	Roles   []Role   `river:"role,block,optional"`
}

RegionAndRoles exposes for each supported job, the AWS regions and IAM roles in which the agent should perform the scrape.

type Role

type Role struct {
	RoleArn    string `river:"role_arn,attr"`
	ExternalID string `river:"external_id,attr,optional"`
}

type StaticJob

type StaticJob struct {
	Name       string         `river:",label"`
	Auth       RegionAndRoles `river:",squash"`
	CustomTags Tags           `river:"custom_tags,attr,optional"`
	Namespace  string         `river:"namespace,attr"`
	Dimensions Dimensions     `river:"dimensions,attr"`
	Metrics    []Metric       `river:"metric,block"`
	NilToZero  *bool          `river:"nil_to_zero,attr,optional"`
}

StaticJob will scrape metrics that match all defined dimensions.

type Tags

type Tags map[string]string

Tags represents a series of tags configured on an AWS resource. Each tag is a key value pair in the dictionary.

Jump to

Keyboard shortcuts

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