Documentation ¶
Index ¶
- Constants
- Variables
- func ExternalMustRegister(cs ...prometheus.Collector)
- func InternalMustRegister(cs ...prometheus.Collector)
- func RecordNodeExtendedResourceAllocatableInternal(node *corev1.Node, resourceName string, unit string, value float64)
- func RecordNodeMetricReconcileCount(isSucceeded bool, reason string)
- func RecordNodeMetricSpecParseCount(isSucceeded bool, reason string)
- func RecordNodeResourceReconcileCount(isSucceeded bool, reason string)
- func RecordNodeResourceRunPluginStatus(pluginName string, isSucceeded bool, reason string)
- func RecordNodeSLOReconcileCount(isSucceeded bool, reason string)
- func RecordNodeSLOSpecParseCount(isSucceeded bool, reason string)
Constants ¶
View Source
const ( SLOControllerSubsystem = "slo_controller" NodeKey = "node" StatusKey = "status" StatusSucceeded = "succeeded" StatusFailed = "failed" ReasonKey = "reason" PluginKey = "plugin" ResourceKey = "resource" UnitKey = "unit" UnitCore = "core" UnitByte = "byte" UnitInteger = "integer" )
View Source
const ( // DefaultHTTPPath use /all-metrics since /metrics is occupied by controller manager default registry DefaultHTTPPath = "/all-metrics" ExternalHTTPPath = "/external-metrics" InternalHTTPPath = "/internal-metrics" )
Variables ¶
View Source
var ( NodeResourceReconcileCount = prometheus.NewCounterVec(prometheus.CounterOpts{ Subsystem: SLOControllerSubsystem, Name: "node_resource_reconcile_count", Help: "the status count of reconciling node resource", }, []string{StatusKey, ReasonKey}) NodeMetricReconcileCount = prometheus.NewCounterVec(prometheus.CounterOpts{ Subsystem: SLOControllerSubsystem, Name: "nodemetric_reconcile_count", Help: "the status count of reconciling NodeMetric", }, []string{StatusKey, ReasonKey}) NodeMetricSpecParseCount = prometheus.NewCounterVec(prometheus.CounterOpts{ Subsystem: SLOControllerSubsystem, Name: "nodemetric_spec_parse_count", Help: "the count of parsing NodeMetric spec", }, []string{StatusKey, ReasonKey}) NodeSLOReconcileCount = prometheus.NewCounterVec(prometheus.CounterOpts{ Subsystem: SLOControllerSubsystem, Name: "nodeslo_reconcile_count", Help: "the status count of reconciling NodeSLO", }, []string{StatusKey, ReasonKey}) NodeSLOSpecParseCount = prometheus.NewCounterVec(prometheus.CounterOpts{ Subsystem: SLOControllerSubsystem, Name: "nodeslo_spec_parse_count", Help: "the count of parsing NodeSLO spec", }, []string{StatusKey, ReasonKey}) CommonCollectors = []prometheus.Collector{ NodeResourceReconcileCount, NodeMetricReconcileCount, NodeMetricSpecParseCount, NodeSLOReconcileCount, NodeSLOSpecParseCount, } )
View Source
var ( // ExternalRegistry register metrics for users ExternalRegistry = prometheus.NewRegistry() // InternalRegistry only register metrics of koord-manager itself for performance and functional monitor InternalRegistry = legacyregistry.DefaultGatherer )
View Source
var ( NodeResourceRunPluginStatus = prometheus.NewCounterVec(prometheus.CounterOpts{ Subsystem: SLOControllerSubsystem, Name: "node_resource_run_plugin_status", Help: "the status count of running node resource plugins", }, []string{PluginKey, StatusKey, ReasonKey}) NodeExtendedResourceAllocatableInternal = metrics.NewGCGaugeVec("node_extended_resource_allocatable_internal", prometheus.NewGaugeVec(prometheus.GaugeOpts{ Subsystem: SLOControllerSubsystem, Name: "node_extended_resource_allocatable_internal", Help: "the internal allocatable of node extended resources which may not be updated at the node status", }, []string{NodeKey, ResourceKey, UnitKey})) NodeResourceCollectors = []prometheus.Collector{ NodeResourceRunPluginStatus, NodeExtendedResourceAllocatableInternal.GetGaugeVec(), } )
Functions ¶
func ExternalMustRegister ¶ added in v1.4.1
func ExternalMustRegister(cs ...prometheus.Collector)
func InternalMustRegister ¶ added in v1.4.1
func InternalMustRegister(cs ...prometheus.Collector)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.