prometheus

package
v0.0.0-...-c7891d0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ErrorRate = "error_rate"
View Source
const RequestLatencyP50 = "response_time_p50"
View Source
const RequestLatencyP90 = "response_time_p90"
View Source
const RequestLatencyP95 = "response_time_p95"
View Source
const Throughput = "throughput"

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	ApiURL        string
	Username      string
	Password      string
	Project       string
	Stage         string
	Service       string
	HTTPClient    *http.Client
	CustomFilters []*keptnv2.SLIFilter
	CustomQueries map[string]string
}

Handler interacts with a prometheus API endpoint

func NewPrometheusHandler

func NewPrometheusHandler(apiURL string, project string, stage string, service string, customFilters []*keptnv2.SLIFilter) *Handler

NewPrometheusHandler returns a new prometheus handler that interacts with the Prometheus REST API

func (*Handler) GetSLIValue

func (ph *Handler) GetSLIValue(metric string, start string, end string, logger keptncommon.LoggerInterface) (float64, error)

GetSLIValue retrieves the specified value via the Prometheus API

Jump to

Keyboard shortcuts

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