config

package
v0.0.0-...-7f009f3 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigGetRuleFiles

func ConfigGetRuleFiles() []string

func DeleteRelabelConfigFromArray

func DeleteRelabelConfigFromArray(arr []*promcfg.RelabelConfig, index int) []*promcfg.RelabelConfig

func FindRelabelConfigInScrapeConfig

func FindRelabelConfigInScrapeConfig(encodedRule string, scrapeConfig promcfg.ScrapeConfig) int

func GenerateMetricRelabelConfig

func GenerateMetricRelabelConfig(s HighCardSeries) (promcfg.RelabelConfig, error)

TODO: Only generate the relabel config for the appropriate job that is spitting out the high-cardinality metric TODO: Within a job, some series may never be exploding on this label. Consider including all relevant labels in source_labels...?

func InsertMetricRelabelConfigToPromConfig

func InsertMetricRelabelConfigToPromConfig(rc promcfg.RelabelConfig, c Configurator) (promcfg.Config, error)

func ListSuppressedMetrics

func ListSuppressedMetrics(c Configurator)

func ReadPromConfig

func ReadPromConfig(c Configurator) (promcfg.Config, error)

func RemoveSilence

func RemoveSilence(label string, pc, bc Configurator) error

func StoreMetricRelabelConfigBombSquad

func StoreMetricRelabelConfigBombSquad(s HighCardSeries, mrc promcfg.RelabelConfig, c Configurator) error

func WriteBombSquadConfig

func WriteBombSquadConfig(bscfg BombSquadConfig, c Configurator) error

func WritePromConfig

func WritePromConfig(pcfg promcfg.Config, c Configurator) error

Types

type BombSquadConfig

type BombSquadConfig struct {
	SuppressedMetrics map[string]BombSquadLabelConfig
}

func ReadBombSquadConfig

func ReadBombSquadConfig(c Configurator) (BombSquadConfig, error)

type BombSquadLabelConfig

type BombSquadLabelConfig map[string]string

type Configurator

type Configurator interface {
	Read() ([]byte, error)
	Write([]byte) error
	GetLocation() string
}

type HighCardSeries

type HighCardSeries struct {
	MetricName        string
	HighCardLabelName model.LabelName
}

HighCardSeries represents a Prometheus series that has been idenitified as high cardinality

Jump to

Keyboard shortcuts

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