Documentation ¶
Overview ¶
Package collector includes all individual collectors to gather and export system metrics.
Index ¶
- Variables
- func DisableDefaultCollectors()
- func IsNoDataError(err error) bool
- type Collector
- func NewDatastoreCollector(logger log.Logger) (Collector, error)
- func NewEsxCollector(logger log.Logger) (Collector, error)
- func NewResourcePoolCollector(logger log.Logger) (Collector, error)
- func NewStoragePodCollector(logger log.Logger) (Collector, error)
- func NewVirtualMachineCollector(logger log.Logger) (Collector, error)
- type Disk
- type EthernetDevice
- type IsecAnnotation
- type MainCollector
- type Network
- type Parents
- type ParentsCache
Constants ¶
This section is empty.
Variables ¶
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 ¶
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 ¶
NewDatastoreCollector returns a new Collector exposing IpTables stats.
func NewEsxCollector ¶
NewEsxCollector returns a new Collector exposing IpTables stats.
func NewResourcePoolCollector ¶
NewResourcePoolCollector returns a new Collector exposing IpTables stats.
func NewStoragePodCollector ¶
NewStoragePodCollector 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 ParentsCache ¶
type ParentsCache struct {
// contains filtered or unexported fields
}
func NewParentsCache ¶
func NewParentsCache() *ParentsCache
func (*ParentsCache) Add ¶
func (c *ParentsCache) Add(mor types.ManagedObjectReference, val Parents)
func (*ParentsCache) Flush ¶
func (c *ParentsCache) Flush()
func (*ParentsCache) Get ¶
func (c *ParentsCache) Get(mor types.ManagedObjectReference) (Parents, bool)