metrics

package
v0.0.0-...-cbd8539 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VersionLabel    = "version"
	BuildLabel      = "build"
	ApiVersionLabel = "api_version"

	HwVersionLabel = "hw_version"
)

Variables

View Source
var (
	EsxiVersionMetric = metrics.NewDesc(
		"vsphere_esxi_version_total",
		"Number of ESXi hosts with given version.",
		[]string{VersionLabel, ApiVersionLabel}, nil,
		metrics.ALPHA, "",
	)
	HwVersionMetric = metrics.NewDesc(
		"vsphere_node_hw_version_total",
		"Number of vSphere nodes with given HW version.",
		[]string{HwVersionLabel}, nil,
		metrics.ALPHA, "",
	)

	CbtMismatchMetric = metrics.NewDesc(
		"vsphere_vm_cbt_checks",
		"Boolean metric based on whether ctkEnabled is consistent or not across all nodes in the cluster.",
		[]string{cbtMismatchLabel}, nil,
		metrics.ALPHA, "",
	)
)

Metrics in this package can be used when we expect metrics with certain label to stop being reported when cluster configuration changes.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	metrics.BaseStableCollector
	// contains filtered or unexported fields
}

func NewMetricsCollector

func NewMetricsCollector() *Collector

func (*Collector) AddMetric

func (c *Collector) AddMetric(m metrics.Metric)

func (*Collector) CollectWithStability

func (c *Collector) CollectWithStability(ch chan<- metrics.Metric)

func (*Collector) DescribeWithStability

func (c *Collector) DescribeWithStability(ch chan<- *metrics.Desc)

func (*Collector) FinishedAllChecks

func (c *Collector) FinishedAllChecks()

FinishedAllChecks updates currentMetrics with inProgressMetrics so as both slices point to same values

func (*Collector) StartMetricCollection

func (c *Collector) StartMetricCollection()

Jump to

Keyboard shortcuts

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