cloudwatch_exporter

package
v0.34.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToYACEConfig

func ToYACEConfig(c *Config) (yaceConf.ScrapeConf, bool, error)

ToYACEConfig converts a Config into YACE's 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. The returned boolean is whether or not AWS FIPS endpoints will be enabled.

Types

type Config

type Config struct {
	STSRegion    string          `yaml:"sts_region"`
	FIPSDisabled bool            `yaml:"fips_disabled"`
	Discovery    DiscoveryConfig `yaml:"discovery"`
	Static       []StaticJob     `yaml:"static"`
}

Config is the configuration for the CloudWatch metrics integration

func (*Config) InstanceKey

func (c *Config) InstanceKey(agentKey string) (string, error)

func (*Config) Name

func (c *Config) Name() string

Name returns the name of the integration this config is for.

func (*Config) NewIntegration

func (c *Config) NewIntegration(l log.Logger) (integrations.Integration, error)

NewIntegration creates a new integration from the config.

type Dimension

type Dimension struct {
	Name  string `yaml:"name"`
	Value string `yaml:"value"`
}

type DiscoveryConfig

type DiscoveryConfig struct {
	ExportedTags TagsPerNamespace `yaml:"exported_tags"`
	Jobs         []*DiscoveryJob  `yaml:"jobs"`
}

DiscoveryConfig configures scraping jobs that will auto-discover metrics dimensions for a given service.

type DiscoveryJob

type DiscoveryJob struct {
	InlineRegionAndRoles `yaml:",inline"`
	InlineCustomTags     `yaml:",inline"`
	SearchTags           []Tag    `yaml:"search_tags"`
	Type                 string   `yaml:"type"`
	Metrics              []Metric `yaml:"metrics"`
}

DiscoveryJob configures a discovery job for a given service.

type InlineCustomTags

type InlineCustomTags struct {
	CustomTags []Tag `yaml:"custom_tags"`
}

type InlineRegionAndRoles

type InlineRegionAndRoles struct {
	Regions []string `yaml:"regions"`
	Roles   []Role   `yaml:"roles"`
}

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

type Metric

type Metric struct {
	Name       string        `yaml:"name"`
	Statistics []string      `yaml:"statistics"`
	Period     time.Duration `yaml:"period"`
}

type Role

type Role struct {
	RoleArn    string `yaml:"role_arn"`
	ExternalID string `yaml:"external_id"`
}

type StaticJob

type StaticJob struct {
	InlineRegionAndRoles `yaml:",inline"`
	InlineCustomTags     `yaml:",inline"`
	Name                 string      `yaml:"name"`
	Namespace            string      `yaml:"namespace"`
	Dimensions           []Dimension `yaml:"dimensions"`
	Metrics              []Metric    `yaml:"metrics"`
}

StaticJob will scrape metrics that match all defined dimensions.

type Tag

type Tag struct {
	Key   string `yaml:"key"`
	Value string `yaml:"value"`
}

type TagsPerNamespace

type TagsPerNamespace map[string][]string

TagsPerNamespace represents for each namespace, a list of tags that will be exported as labels in each metric.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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