collector

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrNoData indicates the collector found no data to collect, but had no other error.
	ErrNoData = errors.New("collector returned no data")
)

Functions

func IsNoDataError

func IsNoDataError(err error) bool

IsNoDataError returns true if error is no data error

func SetPodmanCollectorState

func SetPodmanCollectorState(name string, state bool)

SetPodmanCollectorState enable/disable collectors

Types

type Collector

type Collector interface {
	// Get new metrics and expose them via prometheus registry.
	Update(ch chan<- prometheus.Metric) error
}

Collector is the interface a collector has to implement.

func NewContainerStatsCollector

func NewContainerStatsCollector(logger log.Logger) (Collector, error)

NewContainerStatsCollector returns a Collector exposing containers stats information

func NewImageStatsCollector

func NewImageStatsCollector(logger log.Logger) (Collector, error)

NewImageStatsCollector returns a Collector exposing image stats information

func NewNetworkStatsCollector

func NewNetworkStatsCollector(logger log.Logger) (Collector, error)

NewNetworkStatsCollector returns a Collector exposing network stats information

func NewPodStatsCollector

func NewPodStatsCollector(logger log.Logger) (Collector, error)

NewPodStatsCollector returns a Collector exposing pod stats information

func NewSystemCollector

func NewSystemCollector(logger log.Logger) (Collector, error)

NewSystemCollector returns a Collector exposing podman system information

func NewVolumeStatsCollector

func NewVolumeStatsCollector(logger log.Logger) (Collector, error)

NewVolumeStatsCollector returns a Collector exposing volume stats information

type PodmanCollector

type PodmanCollector struct {
	Collectors map[string]Collector
	// contains filtered or unexported fields
}

PodmanCollector implements the prometheus.Collector interface.

func NewPodmanCollector

func NewPodmanCollector(logger log.Logger) (*PodmanCollector, error)

NewPodmanCollector creates a new PodmanCollector.

func (PodmanCollector) Collect

func (p PodmanCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (PodmanCollector) Describe

func (p PodmanCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

Jump to

Keyboard shortcuts

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