collector_prometheus

package
v0.0.0-...-5fda629 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

func NewCollectorPrometheus

func NewCollectorPrometheus(ctx context.Context, interval int64) (*Collector, error)

func (*Collector) Close

func (r *Collector) Close() error

func (*Collector) Output

func (r *Collector) Output() (<-chan string, error)

收集指定主机的监控数据

type CollectorMetrics

type CollectorMetrics struct {
	MemTotal        uint64    `json:"memTotal"`
	MemAvailable    uint64    `json:"memAvailable"`
	MemUsedPercent  float64   `json:"memUsedPercent"`
	CpuCount        int       `json:"cpuCount"`
	CpuTotalPercent float64   `json:"cpuTotalPercent"`
	BytesSent       uint64    `json:"bytesSent"`
	BytesRecv       uint64    `json:"bytesRecv"`
	Timestamp       time.Time `json:"timestamp"`
}

Jump to

Keyboard shortcuts

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