mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
add metrics to record number of pending pods in different queues
This commit is contained in:
@@ -192,6 +192,16 @@ var (
|
||||
Help: "Total preemption attempts in the cluster till now",
|
||||
})
|
||||
|
||||
pendingPods = prometheus.NewGaugeVec(
|
||||
prometheus.GaugeOpts{
|
||||
Subsystem: SchedulerSubsystem,
|
||||
Name: "pending_pods_total",
|
||||
Help: "Number of pending pods, by the queue type. 'active' means number of pods in activeQ; 'backoff' means number of pods in backoffQ; 'unschedulable' means number of pods in unschedulableQ.",
|
||||
}, []string{"queue"})
|
||||
ActivePods = pendingPods.With(prometheus.Labels{"queue": "active"})
|
||||
BackoffPods = pendingPods.With(prometheus.Labels{"queue": "backoff"})
|
||||
UnschedulablePods = pendingPods.With(prometheus.Labels{"queue": "unschedulable"})
|
||||
|
||||
metricsList = []prometheus.Collector{
|
||||
scheduleAttempts,
|
||||
SchedulingLatency,
|
||||
@@ -210,6 +220,7 @@ var (
|
||||
DeprecatedSchedulingAlgorithmPremptionEvaluationDuration,
|
||||
PreemptionVictims,
|
||||
PreemptionAttempts,
|
||||
pendingPods,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user