Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Common namespace for application metrics. Namespace = "karpenter" ProvisionerLabel = "provisioner" NodePoolLabel = "nodepool" ReasonLabel = "reason" TypeLabel = "type" // Reasons for CREATE/DELETE shared metrics ConsolidationReason = "consolidation" ProvisioningReason = "provisioning" ExpirationReason = "expiration" EmptinessReason = "emptiness" DriftReason = "drift" )
Variables ¶
View Source
var ( NodeClaimsCreatedCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: Namespace, Subsystem: nodeClaimSubsystem, Name: "created", Help: "Number of machines created in total by Karpenter. Labeled by reason the machine was created and the owning provisioner.", }, []string{ ReasonLabel, NodePoolLabel, }, ) NodeClaimsTerminatedCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: Namespace, Subsystem: nodeClaimSubsystem, Name: "terminated", Help: "Number of machines terminated in total by Karpenter. Labeled by reason the machine was terminated and the owning provisioner .", }, []string{ ReasonLabel, NodePoolLabel, }, ) NodeClaimsLaunchedCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: Namespace, Subsystem: nodeClaimSubsystem, Name: "launched", Help: "Number of machines launched in total by Karpenter. Labeled by the owning provisioner.", }, []string{ NodePoolLabel, }, ) NodeClaimsRegisteredCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: Namespace, Subsystem: nodeClaimSubsystem, Name: "registered", Help: "Number of machines registered in total by Karpenter. Labeled by the owning provisioner.", }, []string{ NodePoolLabel, }, ) NodeClaimsInitializedCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: Namespace, Subsystem: nodeClaimSubsystem, Name: "initialized", Help: "Number of machines initialized in total by Karpenter. Labeled by the owning provisioner.", }, []string{ NodePoolLabel, }, ) NodesCreatedCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: Namespace, Subsystem: nodeSubsystem, Name: "created", Help: "Number of nodes created in total by Karpenter. Labeled by owning provisioner.", }, []string{ NodePoolLabel, ProvisionerLabel, }, ) NodesTerminatedCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: Namespace, Subsystem: nodeSubsystem, Name: "terminated", Help: "Number of nodes terminated in total by Karpenter. Labeled by owning provisioner.", }, []string{ NodePoolLabel, ProvisionerLabel, }, ) // TODO @joinnis: Remove these metrics when dropping v1alpha5 and no longer supporting Machines MachinesCreatedCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: Namespace, Subsystem: machineSubsystem, Name: "created", Help: "Number of machines created in total by Karpenter. Labeled by reason the machine was created and the owning provisioner.", }, []string{ ReasonLabel, ProvisionerLabel, }, ) MachinesTerminatedCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: Namespace, Subsystem: machineSubsystem, Name: "terminated", Help: "Number of machines terminated in total by Karpenter. Labeled by reason the machine was terminated and the owning provisioner.", }, []string{ ReasonLabel, ProvisionerLabel, }, ) MachinesLaunchedCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: Namespace, Subsystem: machineSubsystem, Name: "launched", Help: "Number of machines launched in total by Karpenter. Labeled by the owning provisioner.", }, []string{ ProvisionerLabel, }, ) MachinesRegisteredCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: Namespace, Subsystem: machineSubsystem, Name: "registered", Help: "Number of machines registered in total by Karpenter. Labeled by the owning provisioner.", }, []string{ ProvisionerLabel, }, ) MachinesInitializedCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: Namespace, Subsystem: machineSubsystem, Name: "initialized", Help: "Number of machines initialized in total by Karpenter. Labeled by the owning provisioner.", }, []string{ ProvisionerLabel, }, ) MachinesDisruptedCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: Namespace, Subsystem: machineSubsystem, Name: "disrupted", Help: "Number of machines disrupted in total by Karpenter. Labeled by disruption type of the machine and the owning provisioner.", }, []string{ TypeLabel, ProvisionerLabel, }, ) MachinesDriftedCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: Namespace, Subsystem: machineSubsystem, Name: "drifted", Help: "Number of machine drifted reasons in total by Karpenter. Labeled by drift type of the machine and the owning provisioner..", }, []string{ TypeLabel, ProvisionerLabel, }, ) )
Functions ¶
func DurationBuckets ¶
func DurationBuckets() []float64
DurationBuckets returns a []float64 of default threshold values for duration histograms. Each returned slice is new and may be modified without impacting other bucket definitions.
func Measure ¶
func Measure(observer prometheus.Observer) func()
Measure returns a deferrable function that observes the duration between the defer statement and the end of the function.
func SummaryObjectives ¶
Returns a map of summary objectives (quantile-error pairs)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.