Documentation ¶
Index ¶
- func NewCloudwatchExporter(name string, logger log.Logger, conf yaceConf.ScrapeConf, ...) *exporter
- func NewDecoupledCloudwatchExporter(name string, logger log.Logger, conf yaceConf.ScrapeConf, ...) *asyncExporter
- func PatchYACEDefaults(yc *yaceConf.ScrapeConf)
- func ToYACEConfig(c *Config) (yaceConf.ScrapeConf, bool, error)
- type Config
- type DecoupledScrapeConfig
- type Dimension
- type DiscoveryConfig
- type DiscoveryJob
- type InlineCustomTags
- type InlineRegionAndRoles
- type Metric
- type Role
- type StaticJob
- type Tag
- type TagsPerNamespace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCloudwatchExporter ¶ added in v0.35.0
func NewCloudwatchExporter(name string, logger log.Logger, conf yaceConf.ScrapeConf, fipsEnabled, debug bool) *exporter
NewCloudwatchExporter creates a new YACE wrapper, that implements Integration
func NewDecoupledCloudwatchExporter ¶ added in v0.36.0
func NewDecoupledCloudwatchExporter(name string, logger log.Logger, conf yaceConf.ScrapeConf, scrapeInterval time.Duration, fipsEnabled, debug bool) *asyncExporter
NewDecoupledCloudwatchExporter creates a new YACE wrapper, that implements Integration. The decouple feature spawns a background go-routine to perform YACE metric collection allowing for a decoupled collection of AWS metrics from the ServerHandler.
func PatchYACEDefaults ¶ added in v0.35.0
func PatchYACEDefaults(yc *yaceConf.ScrapeConf)
PatchYACEDefaults overrides some default values YACE applies after validation.
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"` Debug bool `yaml:"debug"` DecoupledScrape DecoupledScrapeConfig `yaml:"decoupled_scraping"` }
Config is the configuration for the CloudWatch metrics integration
func (*Config) NewIntegration ¶
func (c *Config) NewIntegration(l log.Logger) (integrations.Integration, error)
NewIntegration creates a new integration from the config.
type DecoupledScrapeConfig ¶ added in v0.36.0
type DecoupledScrapeConfig struct { Enabled bool `yaml:"enabled"` // ScrapeInterval defines the decoupled scraping interval. If left empty, a default interval of 5m is used ScrapeInterval *time.Duration `yaml:"scrape_interval,omitempty"` }
DecoupledScrapeConfig is the configuration for decoupled scraping feature.
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"` DimensionNameRequirements []string `yaml:"dimension_name_requirements"` 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 ¶
InlineRegionAndRoles exposes for each supported job, the AWS regions and IAM roles in which the agent should perform the scrape.
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 TagsPerNamespace ¶
TagsPerNamespace represents for each namespace, a list of tags that will be exported as labels in each metric.