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 NewPrometheusProvider ¶
func NewPrometheusProvider(config config.PrometheusProviderConfig) (*prometheusProvider, error)
NewPrometheusProvider contructs a metric provider that gets data from Prometheus.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.