collector

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: Apache-2.0, Apache-2.0 Imports: 41 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const ClocksPerSec = float64(C.CLK_TCK)

ClocksPerSec default value. from time.h

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 NewBuddyinfoCollector

func NewBuddyinfoCollector() (Collector, error)

NewBuddyinfoCollector returns a new Collector exposing buddyinfo stats.

func NewCPUCollector

func NewCPUCollector() (Collector, error)

NewCPUCollector returns a new Collector exposing CPU stats.

func NewDiskstatsCollector

func NewDiskstatsCollector() (Collector, error)

NewDiskstatsCollector returns a new Collector exposing disk device stats.

func NewFilesystemCollector

func NewFilesystemCollector() (Collector, error)

NewFilesystemCollector returns a new Collector exposing filesystems stats.

func NewLoadavgCollector

func NewLoadavgCollector() (Collector, error)

NewLoadavgCollector returns a new Collector exposing load average stats.

func NewMeminfoCollector

func NewMeminfoCollector() (Collector, error)

NewMeminfoCollector returns a new Collector exposing memory stats.

func NewNetDevCollector

func NewNetDevCollector() (Collector, error)

NewNetDevCollector returns a new Collector exposing network device stats.

func NewNtpCollector

func NewNtpCollector() (Collector, error)

NewNtpCollector returns a new Collector exposing sanity of local NTP server. Default definition of "local" is: - collector.ntp.server address is a loopback address (or collector.ntp.server-is-mine flag is turned on) - the server is reachable with outgoin IP_TTL = 1

func NewRunitCollector

func NewRunitCollector() (Collector, error)

NewRunitCollector returns a new Collector exposing runit statistics.

func NewSupervisordCollector

func NewSupervisordCollector() (Collector, error)

NewSupervisordCollector returns a new Collector exposing supervisord statistics.

func NewTextFileCollector

func NewTextFileCollector() (Collector, error)

NewTextFileCollector returns a new Collector exposing metrics read from files in the given textfile directory.

func NewTimeCollector

func NewTimeCollector() (Collector, error)

NewTimeCollector returns a new Collector exposing the current system time in seconds since epoch.

type NodeCollector

type NodeCollector struct {
	Collectors map[string]Collector
}

NodeCollector implements the prometheus.Collector interface.

func NewNodeCollector

func NewNodeCollector(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