maxdimassociator

package
v0.59.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Associator

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

Associator implements a "best effort" algorithm to automatically map the output of the ListMetrics API to the list of resources retrieved from the Tagging API. The core logic is based on a manually maintained list of regexes that extract dimensions names from ARNs (see services.go). YACE supports auto-discovery for those AWS namespaces where the ARN regexes are correctly defined.

func NewAssociator

func NewAssociator(logger logging.Logger, dimensionsRegexps []model.DimensionsRegexp, resources []*model.TaggedResource) Associator

NewAssociator builds all mappings for the given dimensions regexps and list of resources.

func (Associator) AssociateMetricToResource

func (assoc Associator) AssociateMetricToResource(cwMetric *model.Metric) (*model.TaggedResource, bool)

AssociateMetricToResource finds the resource that corresponds to the given set of dimensions names and values of a metric. The guess is based on the mapping built from dimensions regexps. In case a map can't be found, the second return parameter indicates whether the metric should be ignored or not.

Jump to

Keyboard shortcuts

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