prometheus

package
v0.0.0-...-f9d3faf Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SumBy string = "sum by"
)

Variables

This section is empty.

Functions

func MakeQueryCPIString

func MakeQueryCPIString(options common.MetricQueryOptions) (string, error)

MakeQueryCPIString constructs PromQL style query string based on @options.

@return "sum by (container_id, container_name, pod_uid, pod_namespace, pod_name, node) " + "(koordlet_container_cpi{cpi_field=\"cycles\"}) / " + "sum by (container_id, container_name, pod_uid, pod_namespace, pod_name, node) " + "(koordlet_container_cpi{cpi_field=\"instructions\"})"

where (container_id, container_name, pod_uid, pod_namespace, pod_name, node) is the PromSumByLabels slice {cpi_field=\"cycles\"} is the FilterLabels map koordlet_container_cpi is options.MetricName

func NewDefaultCPISumByLabels

func NewDefaultCPISumByLabels(metricName string) ([]string, error)

func NewPrometheusProvider

func NewPrometheusProvider(config config.PrometheusProviderConfig) (*prometheusProvider, error)

NewPrometheusProvider contructs a metric provider that gets data from Prometheus.

Types

This section is empty.

Jump to

Keyboard shortcuts

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