metrics

package
v0.7.9 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRegistry

func GetRegistry() *prometheus.Registry

Types

type PrometheusExporter

type PrometheusExporter struct {
	ProcessStatsCollector   prometheus.Collector
	ContainerStatsCollector prometheus.Collector
	VMStatsCollector        prometheus.Collector
	NodeStatsCollector      prometheus.Collector

	// Lock to syncronize the collector update with prometheus exporter
	Mx sync.Mutex
}

PrometheusExporter holds the list of prometheus metric collectors

func NewPrometheusExporter

func NewPrometheusExporter() *PrometheusExporter

NewPrometheusExporter creates a new prometheus exporter

func (*PrometheusExporter) NewContainerCollector

func (e *PrometheusExporter) NewContainerCollector(containerMetrics map[string]*stats.ContainerStats)

NewContainerCollector creates a new prometheus collector for container metrics

func (*PrometheusExporter) NewNodeCollector

func (e *PrometheusExporter) NewNodeCollector(nodeMetrics *stats.NodeStats)

NewNodeCollector creates a new prometheus collector for node metrics

func (*PrometheusExporter) NewProcessCollector

func (e *PrometheusExporter) NewProcessCollector(processMetrics map[uint64]*stats.ProcessStats)

NewProcessCollector creates a new prometheus collector for process metrics

func (*PrometheusExporter) NewVMCollector

func (e *PrometheusExporter) NewVMCollector(vmMetrics map[string]*stats.VMStats)

NewVMCollector creates a new prometheus collector for vm metrics

func (*PrometheusExporter) RegisterMetrics

func (e *PrometheusExporter) RegisterMetrics() *prometheus.Registry

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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