prometheus

package
v0.6.1-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(address string, nodeLister corelistersv1.NodeLister) (metrics.Backend, error)

NewClient returns a new client for talking to a Prometheus Backend, or an error

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

Backend implements a metrics backend for Prometheus. It requires a pod lister so that it can gather info about the prom-exporter pods. Pods accessed via the lister must not be mutated.

func (Backend) GetValue

func (b Backend) GetValue(metric string, configuration map[string]string, nodeSelector map[string]string) (float64, error)

GetValue implements the metrics.Backend interface

type Metric

type Metric int

Metric is a metric exposed by this backend

const (
	// MetricCPUPercentUtilization is used to gather info about the CPU usage of nodes
	MetricCPUPercentUtilization Metric = iota
	// MetricMemoryPercentUtilization is used to gather info about the CPU usage of nodes
	MetricMemoryPercentUtilization
	// MetricCustom is used to perform a custom Prometheus query
	MetricCustom
)

func (Metric) String

func (m Metric) String() string

String is a stringer for Metric

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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