prometheuscfg

package
v0.0.0-...-197aa00 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cfg

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

func New

func New(c *config.C) (*Cfg, error)

func (*Cfg) CreateConfigFile

func (c *Cfg) CreateConfigFile() (file string, err error)

func (*Cfg) GetYaml

func (c *Cfg) GetYaml() []byte

type GlbConfig

type GlbConfig struct {
	ScrapeInterval     time.Duration     `yaml:"scrape_interval"`
	ScrapeTimeout      time.Duration     `yaml:"scrape_timeout"`
	EvaluationInternal time.Duration     `yaml:"evaluation_interval"`
	ExternalLabels     map[string]string `yaml:"external_labels"`
}

type PromConfig

type PromConfig struct {
	Global        GlbConfig `yaml:"global"`
	ScrapeConfigs []PromJob `yaml:"scrape_configs"`
}

type PromJob

type PromJob struct {
	JobName        string        `yaml:"job_name"`
	ScrapeInterval time.Duration `yaml:"scrape_interval"`
	StaticConfigs  []SConfigs    `yaml:"static_configs"`
	ScrapeTimeout  time.Duration `yaml:"scrape_timeout"`
}

func NewPromJob

func NewPromJob(name, targetHost string, interval, timeout time.Duration) PromJob

type R

type R struct {
	gen.R
}

func NewPrometheusRunner

func NewPrometheusRunner(conf *config.C, nodeID int, isProducer bool) (r *R, err error)

func (*R) StartPrometheus

func (r *R) StartPrometheus() error

type SConfigs

type SConfigs struct {
	Targets []string `yaml:"targets"`
}

type SrpConfigs

type SrpConfigs struct {
	Jobs []PromJob
}

Jump to

Keyboard shortcuts

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