prometheus

package
v0.6.9 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

Backend implements a metric backend for Prometheus.

func New

func New(logger log.Logger, address, username, password string) (*Backend, error)

New returns a new client for talking to a Prometheus Backend, or an error

func (*Backend) GetAddress

func (b *Backend) GetAddress() string

GetAddress returns backend address.

func (*Backend) GetAlertManagerSilences

func (b *Backend) GetAlertManagerSilences(ctx context.Context, filter []string) (map[string]ammodels.Silence, error)

GetAlertmanagerSilences returns silences in Alertmanagers.

func (*Backend) GetType

func (b *Backend) GetType() string

GetType returns backend type, for example Prometheus.

func (*Backend) QueryInstant

func (b *Backend) QueryInstant(ctx context.Context, query string, ts time.Time) (model.Vector, error)

QueryInstant performs instant query and returns results in model.Vector type.

Jump to

Keyboard shortcuts

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