prometheus

package
v0.0.0-test Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: AGPL-3.0 Imports: 26 Imported by: 134

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertAPIError

func ConvertAPIError(err error) error

func IsAPIError

func IsAPIError(err error) bool

IsAPIError returns whether err is or wraps a Prometheus error.

Types

type DatasourceInfo

type DatasourceInfo struct {
	ID           int64
	URL          string
	TimeInterval string
	// contains filtered or unexported fields
}

type ExemplarEvent

type ExemplarEvent struct {
	Time   time.Time
	Value  float64
	Labels map[string]string
}

type PrometheusQuery

type PrometheusQuery struct {
	Expr          string
	Step          time.Duration
	LegendFormat  string
	Start         time.Time
	End           time.Time
	RefId         string
	InstantQuery  bool
	RangeQuery    bool
	ExemplarQuery bool
	UtcOffsetSec  int64
}

type QueryModel

type QueryModel struct {
	Expr           string `json:"expr"`
	LegendFormat   string `json:"legendFormat"`
	Interval       string `json:"interval"`
	IntervalMS     int64  `json:"intervalMS"`
	StepMode       string `json:"stepMode"`
	RangeQuery     bool   `json:"range"`
	InstantQuery   bool   `json:"instant"`
	ExemplarQuery  bool   `json:"exemplar"`
	IntervalFactor int64  `json:"intervalFactor"`
	UtcOffsetSec   int64  `json:"utcOffsetSec"`
}

type Service

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

func ProvideService

func ProvideService(httpClientProvider httpclient.Provider, registrar plugins.CoreBackendRegistrar) (*Service, error)

func (*Service) QueryData

type TimeSeriesQueryType

type TimeSeriesQueryType string
const (
	RangeQueryType    TimeSeriesQueryType = "range"
	InstantQueryType  TimeSeriesQueryType = "instant"
	ExemplarQueryType TimeSeriesQueryType = "exemplar"
)

Jump to

Keyboard shortcuts

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