collector

package
v1.1.1 Latest Latest
Warning

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

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

Documentation

Overview

Package collector includes all individual collectors to gather and export system metrics.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoData = errors.New("collector returned no data")

ErrNoData indicates the collector found no data to collect, but had no other error.

Functions

func DisableDefaultCollectors

func DisableDefaultCollectors()

DisableDefaultCollectors sets the collector state to false for all collectors which have not been explicitly enabled on the command line.

func IsNoDataError

func IsNoDataError(err error) bool

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 NewDatastoreCollector

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

NewDatastoreCollector returns a new Collector exposing IpTables stats.

func NewEsxCollector

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

NewEsxCollector returns a new Collector exposing IpTables stats.

func NewResourcePoolCollector

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

NewResourcePoolCollector returns a new Collector exposing IpTables stats.

func NewStoragePodCollector

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

NewStoragePodCollector returns a new Collector exposing IpTables stats.

func NewVirtualMachineCollector

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

NewVirtualMachineCollector returns a new Collector exposing IpTables stats.

type Disk

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

func GetDisks

func GetDisks(vm mo.VirtualMachine) []Disk

type EthernetDevice

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

func GetEthernetDevices

func GetEthernetDevices(vm mo.VirtualMachine) []EthernetDevice

type IsecAnnotation

type IsecAnnotation struct {
	Criticality string `json:"crit"`
	Responsable string `json:"resp"`
	Service     string `json:"svc"`
}

func GetIsecAnnotation

func GetIsecAnnotation(vm mo.VirtualMachine) IsecAnnotation

type MainCollector

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

MainCollector implements the prometheus.Collector interface.

func NewMainCollector

func NewMainCollector(logger log.Logger, filters ...string) (*MainCollector, error)

NewMainCollector creates a new MainCollector.

func (MainCollector) Collect

func (n MainCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (MainCollector) Describe

func (n MainCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

type Network

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

func GetNetworks

func GetNetworks(vm mo.VirtualMachine) []Network

type Parents

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

type ParentsCache

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

func NewParentsCache

func NewParentsCache() *ParentsCache

func (*ParentsCache) Add

func (*ParentsCache) Flush

func (c *ParentsCache) Flush()

func (*ParentsCache) Get

Jump to

Keyboard shortcuts

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