prometheus

package
v1.5.0-alpha.3....-7948e3f Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpectPrometheus

func ExpectPrometheus(f *framework.Framework) (url, bearerToken string, oc *exutil.CLI, ok bool)

ExpectPrometheus uses an existing framework to return information used to make http requests to Prometheus

func ExpectPrometheusEndpoint

func ExpectPrometheusEndpoint(namespace, podName, url string)

ExpectPrometheusEndpoint attempts to connect to the metrics endpoint with delayed retries upon failure.

func ExpectURLStatusCodeExec

func ExpectURLStatusCodeExec(ns, execPodName, url string, statusCode int) error

ExpectURLStatusCodeExec attempts connection to url returning an error upon failure or if status return code is not equal to statusCode.

func GetBearerTokenURLViaPod

func GetBearerTokenURLViaPod(ns, execPodName, url, bearer string) (string, error)

GetBearerTokenURLViaPod makes http request through given pod

func LocatePrometheus

func LocatePrometheus(oc *exutil.CLI) (url, bearerToken string, ok bool)

LocatePrometheus uses an exisitng CLI to return information used to make http requests to Prometheus

func RunQueries

func RunQueries(promQueries map[string]bool, oc *exutil.CLI, ns, execPodName, baseURL, bearerToken string) error

RunQueries executes Prometheus queries and checks provided expected result.

Types

type PrometheusResponse

type PrometheusResponse struct {
	Status string                 `json:"status"`
	Data   prometheusResponseData `json:"data"`
}

PrometheusResponse is used to contain prometheus query results

Jump to

Keyboard shortcuts

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