converter

package
v3.1.5+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CadvisorCollector

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

CadvisorCollector metric collector and converter

func NewCadvisorCollector

func NewCadvisorCollector(
	infoProvider InfoProvider,
	sendDP func(*datapoint.Datapoint),
	defaultDimensions map[string]string) *CadvisorCollector

NewCadvisorCollector creates new CadvisorCollector

func (*CadvisorCollector) Collect

func (c *CadvisorCollector) Collect()

Collect fetches the stats from all containers and delivers them as Prometheus metrics. It implements prometheus.PrometheusCollector.

type InfoProvider

type InfoProvider interface {
	// Get information about all subcontainers of the specified container (includes self).
	SubcontainersInfo(containerName string) ([]info.ContainerInfo, error)
	// Get information about the machine.
	GetMachineInfo() (*info.MachineInfo, error)
}

InfoProvider provides a swappable interface to actually get the cAdvisor metrics

Jump to

Keyboard shortcuts

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