Documentation ¶
Index ¶
Constants ¶
View Source
const ( HCOMetricOverwrittenModifications = "overwrittenModifications" HCOMetricUnsafeModifications = "unsafeModifications" HCOMetricHyperConvergedExists = "HyperConvergedCRExists" HyperConvergedExists = float64(1) HyperConvergedNotExists = float64(0) )
Variables ¶
View Source
var HcoMetrics = func() hcoMetrics { metricDescList := map[string]metricDesc{ HCOMetricOverwrittenModifications: { fqName: "kubevirt_hco_out_of_band_modifications_count", help: "Count of out-of-band modifications overwritten by HCO", mType: "Counter", constLabelPairs: []string{counterLabelCompName}, initFunc: func(md metricDesc) prometheus.Collector { return prometheus.NewCounterVec( prometheus.CounterOpts{ Name: md.fqName, Help: md.help, }, md.constLabelPairs, ) }, }, HCOMetricUnsafeModifications: { fqName: "kubevirt_hco_unsafe_modification_count", help: "Count of unsafe modifications in the HyperConverged annotations", mType: "Gauge", constLabelPairs: []string{counterLabelAnnName}, initFunc: func(md metricDesc) prometheus.Collector { return prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: md.fqName, Help: md.help, }, md.constLabelPairs, ) }, }, HCOMetricHyperConvergedExists: { fqName: "kubevirt_hco_hyperconverged_cr_exists", help: "Indicates whether the HyperConverged custom resource exists (1) or not (0)", mType: "Gauge", constLabelPairs: []string{counterLabelAnnName}, initFunc: func(md metricDesc) prometheus.Collector { return prometheus.NewGauge( prometheus.GaugeOpts{ Name: md.fqName, Help: md.help, }, ) }, }, } metricList := make(map[string]prometheus.Collector) for k, md := range metricDescList { metricList[k] = md.init() } return hcoMetrics{ metricDescList: metricDescList, metricList: metricList, } }()
HcoMetrics wrapper for all hco metrics
Functions ¶
This section is empty.
Types ¶
type MetricDescription ¶ added in v1.6.0
Click to show internal directories.
Click to hide internal directories.