victoriametrics

package
v2.17.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: AGPL-3.0 Imports: 27 Imported by: 1

Documentation

Overview

Package victoriametrics provides facilities for working with VictoriaMetrics.

Index

Constants

View Source
const (

	// BasePrometheusConfigPath - basic path with prometheus config,
	// that user can mount to container.
	BasePrometheusConfigPath = "/srv/prometheus/prometheus.base.yml"
)

Variables

This section is empty.

Functions

func AddInternalServicesToScrape

func AddInternalServicesToScrape(cfg *config.Config, s models.MetricsResolutions, dbaas bool)

AddInternalServicesToScrape adds internal services metrics to scrape targets.

func AddScrapeConfigs

func AddScrapeConfigs(l *logrus.Entry, cfg *config.Config, q *reform.Querier, s *models.MetricsResolutions, pmmAgentID *string, pushMetrics bool) error

AddScrapeConfigs - adds agents scrape configuration to given scrape config, pmm_agent_id and push_metrics used for filtering.

func ScrapeTimeout

func ScrapeTimeout(interval time.Duration) config.Duration

ScrapeTimeout - wraps scrapeTimeout and makes it public for victoriametrics package.

Types

type Service

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

Service is responsible for interactions with VictoriaMetrics.

func NewVictoriaMetrics

func NewVictoriaMetrics(scrapeConfigPath string, db *reform.DB, baseURL string, params *models.VictoriaMetricsParams) (*Service, error)

NewVictoriaMetrics creates new VictoriaMetrics service.

func (*Service) BuildScrapeConfigForVMAgent

func (svc *Service) BuildScrapeConfigForVMAgent(pmmAgentID string) ([]byte, error)

BuildScrapeConfigForVMAgent builds scrape configuration for given pmm-agent.

func (*Service) IsReady

func (svc *Service) IsReady(ctx context.Context) error

IsReady verifies that VictoriaMetrics works.

func (*Service) RequestConfigurationUpdate

func (svc *Service) RequestConfigurationUpdate()

RequestConfigurationUpdate requests VictoriaMetrics configuration update.

func (*Service) Run

func (svc *Service) Run(ctx context.Context)

Run runs VictoriaMetrics configuration update loop until ctx is canceled.

Jump to

Keyboard shortcuts

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