prometheus

package
v2.5.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Overview

Package prometheus contains business logic of working with Prometheus.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service is responsible for interactions with Prometheus. It assumes the following:

  • Prometheus APIs (including lifecycle) are accessible;
  • Prometheus configuration and rule files are accessible;
  • promtool is available.

func NewService

func NewService(configPath, baseConfigPath, promtoolPath string, db *reform.DB, baseURL string) (*Service, error)

NewService creates new service.

func (*Service) Check

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

Check verifies that Prometheus works.

func (*Service) RequestConfigurationUpdate

func (svc *Service) RequestConfigurationUpdate()

RequestConfigurationUpdate requests Prometheus configuration update.

func (*Service) Run

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

Run runs Prometheus 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