querier

package
v0.0.0-...-c647e0b Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetResponseAndTiming

func GetResponseAndTiming(ctx context.Context, args *map[string]interface{}) error

GetResponseAndTiming gets the response and response time for an http request to the endpoint at a given urlString and records the metrics into the appropriate prometheus register under the label specified by urlString The args are expected to be a map of the string "promArgs" to the above PrometheusArgs struct. It is formatted this way in order for it to be able to be called by a worker (see endpointmanager/pkg/workers)

Types

type PrometheusArgs

type PrometheusArgs struct {
	URLString                         string
	ResponseTimeGaugeVec              *prometheus.GaugeVec
	TotalUptimeChecksCounterVec       *prometheus.CounterVec
	TotalFailedUptimeChecksCounterVec *prometheus.CounterVec
	HTTPCodesGaugeVec                 *prometheus.GaugeVec
}

PrometheusArgs is a struct of the prometheus collectors that are used to save the values like response time and response code from the URL request and the URLString used to make the request and access the collectors

Jump to

Keyboard shortcuts

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