system

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MemFree       MetricName = "memFree"
	MemTotal                 = "memTotal"
	MemActualFree            = "memActualFree"
	MemActualUsed            = "memActualUsed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

func NewSystemMetrics

func NewSystemMetrics(logger *zap.SugaredLogger, ms MetricSet) *Collector

func (*Collector) Close

func (c *Collector) Close() error

func (*Collector) Collect

func (c *Collector) Collect(metrics chan<- prometheus.Metric)

func (*Collector) Describe

func (c *Collector) Describe(descs chan<- *prometheus.Desc)

type Metric

type Metric struct {
	Name        string            `json:"name"`
	Help        string            `json:"help"`
	ConstLabels prometheus.Labels `json:"constLabels"`
	// contains filtered or unexported fields
}

type MetricName

type MetricName string

type MetricSet

type MetricSet map[MetricName]*Metric

MetricSet is the metrics used by the system collector.

NOTE: this works differently to the other collectors - the keys are well-known

Jump to

Keyboard shortcuts

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