collector

package
v1.1.24 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 NewCPUCollector

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

NewCPUCollector returns a new Collector exposing kernel/system statistics.

func NewDiskstatsCollector

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

NewDiskstatsCollector returns a new Collector exposing disk device stats. Docs from https://www.kernel.org/doc/Documentation/iostats.txt

func NewFilesystemCollector

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

NewFilesystemCollector returns a new Collector exposing filesystems stats.

func NewLoadavgCollector

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

NewLoadavgCollector returns a new Collector exposing load average stats.

func NewMeminfoCollector

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

NewMeminfoCollector returns a new Collector exposing memory stats.

func NewNetDevCollector

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

NewNetDevCollector returns a new Collector exposing network device stats.

func NewNetStatCollector

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

NewNetStatCollector takes and returns a new Collector exposing network stats.

func NewSockStatCollector

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

NewSockStatCollector returns a new Collector exposing socket stats.

func NewStatCollector

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

NewStatCollector returns a new Collector exposing kernel/system statistics.

type NodeCollector

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

NodeCollector implements the prometheus.Collector interface.

func NewNodeCollector

func NewNodeCollector(logger log.Logger, filters ...string) (*NodeCollector, error)

NewNodeCollector creates a new NodeCollector.

func (NodeCollector) Collect

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

Collect implements the prometheus.Collector interface.

func (NodeCollector) Describe

func (n NodeCollector) 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