prometheus

package
v0.3.10 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPrefix

func AddPrefix(scrapeConfigs []*config.ScrapeConfig, prefix string) []*config.ScrapeConfig

func ConfigToResource

func ConfigToResource(cfg *Config) (*v1.PrometheusConfig, error)

func NewPrometheusConfigmapConverter

func NewPrometheusConfigmapConverter() configmap.ConfigMapConverter

Types

type Config

type Config struct {
	GlobalConfig   *config.GlobalConfig   `yaml:"global"`
	AlertingConfig config.AlertingConfig  `yaml:"alerting,omitempty"`
	RuleFiles      []string               `yaml:"rule_files,omitempty"`
	ScrapeConfigs  []*config.ScrapeConfig `yaml:"scrape_configs,omitempty"`

	RemoteWriteConfigs []*config.RemoteWriteConfig `yaml:"remote_write,omitempty"`
	RemoteReadConfigs  []*config.RemoteReadConfig  `yaml:"remote_read,omitempty"`
}

type Config config.Config

func ConfigFromResource

func ConfigFromResource(cfg *v1.PrometheusConfig) (*Config, error)

func (*Config) AddScrapeConfigs

func (cfg *Config) AddScrapeConfigs(scrapeConfigs []*config.ScrapeConfig) int

returns number of added

func (*Config) RemoveScrapeConfigs

func (cfg *Config) RemoveScrapeConfigs(namePrefix string) int

returns number of removed

Jump to

Keyboard shortcuts

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