mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Merge pull request #45949 from NickrenREN/kubelet-metric
Automatic merge from submit-queue (batch tested with PRs 45949, 46009, 46320, 46423, 46437) Unregister some metrics delete some registered metrics since they are not observed **Release note**: ```release-note NONE ```
This commit is contained in:
commit
470a6a45d5
@ -26,21 +26,18 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
KubeletSubsystem = "kubelet"
|
||||
PodWorkerLatencyKey = "pod_worker_latency_microseconds"
|
||||
SyncPodsLatencyKey = "sync_pods_latency_microseconds"
|
||||
PodStartLatencyKey = "pod_start_latency_microseconds"
|
||||
PodStatusLatencyKey = "generate_pod_status_latency_microseconds"
|
||||
ContainerManagerOperationsKey = "container_manager_latency_microseconds"
|
||||
CgroupManagerOperationsKey = "cgroup_manager_latency_microseconds"
|
||||
DockerOperationsLatencyKey = "docker_operations_latency_microseconds"
|
||||
DockerOperationsKey = "docker_operations"
|
||||
DockerOperationsErrorsKey = "docker_operations_errors"
|
||||
DockerOperationsTimeoutKey = "docker_operations_timeout"
|
||||
PodWorkerStartLatencyKey = "pod_worker_start_latency_microseconds"
|
||||
PLEGRelistLatencyKey = "pleg_relist_latency_microseconds"
|
||||
PLEGRelistIntervalKey = "pleg_relist_interval_microseconds"
|
||||
EvictionStatsAgeKey = "eviction_stats_age_microseconds"
|
||||
KubeletSubsystem = "kubelet"
|
||||
PodWorkerLatencyKey = "pod_worker_latency_microseconds"
|
||||
PodStartLatencyKey = "pod_start_latency_microseconds"
|
||||
CgroupManagerOperationsKey = "cgroup_manager_latency_microseconds"
|
||||
DockerOperationsLatencyKey = "docker_operations_latency_microseconds"
|
||||
DockerOperationsKey = "docker_operations"
|
||||
DockerOperationsErrorsKey = "docker_operations_errors"
|
||||
DockerOperationsTimeoutKey = "docker_operations_timeout"
|
||||
PodWorkerStartLatencyKey = "pod_worker_start_latency_microseconds"
|
||||
PLEGRelistLatencyKey = "pleg_relist_latency_microseconds"
|
||||
PLEGRelistIntervalKey = "pleg_relist_interval_microseconds"
|
||||
EvictionStatsAgeKey = "eviction_stats_age_microseconds"
|
||||
// Metrics keys of remote runtime operations
|
||||
RuntimeOperationsKey = "runtime_operations"
|
||||
RuntimeOperationsLatencyKey = "runtime_operations_latency_microseconds"
|
||||
@ -63,13 +60,6 @@ var (
|
||||
},
|
||||
[]string{"operation_type"},
|
||||
)
|
||||
SyncPodsLatency = prometheus.NewSummary(
|
||||
prometheus.SummaryOpts{
|
||||
Subsystem: KubeletSubsystem,
|
||||
Name: SyncPodsLatencyKey,
|
||||
Help: "Latency in microseconds to sync all pods.",
|
||||
},
|
||||
)
|
||||
PodStartLatency = prometheus.NewSummary(
|
||||
prometheus.SummaryOpts{
|
||||
Subsystem: KubeletSubsystem,
|
||||
@ -77,21 +67,6 @@ var (
|
||||
Help: "Latency in microseconds for a single pod to go from pending to running. Broken down by podname.",
|
||||
},
|
||||
)
|
||||
PodStatusLatency = prometheus.NewSummary(
|
||||
prometheus.SummaryOpts{
|
||||
Subsystem: KubeletSubsystem,
|
||||
Name: PodStatusLatencyKey,
|
||||
Help: "Latency in microseconds to generate status for a single pod.",
|
||||
},
|
||||
)
|
||||
ContainerManagerLatency = prometheus.NewSummaryVec(
|
||||
prometheus.SummaryOpts{
|
||||
Subsystem: KubeletSubsystem,
|
||||
Name: ContainerManagerOperationsKey,
|
||||
Help: "Latency in microseconds for container manager operations. Broken down by method.",
|
||||
},
|
||||
[]string{"operation_type"},
|
||||
)
|
||||
CgroupManagerLatency = prometheus.NewSummaryVec(
|
||||
prometheus.SummaryOpts{
|
||||
Subsystem: KubeletSubsystem,
|
||||
@ -197,11 +172,8 @@ func Register(containerCache kubecontainer.RuntimeCache) {
|
||||
registerMetrics.Do(func() {
|
||||
prometheus.MustRegister(PodWorkerLatency)
|
||||
prometheus.MustRegister(PodStartLatency)
|
||||
prometheus.MustRegister(PodStatusLatency)
|
||||
prometheus.MustRegister(DockerOperationsLatency)
|
||||
prometheus.MustRegister(ContainerManagerLatency)
|
||||
prometheus.MustRegister(CgroupManagerLatency)
|
||||
prometheus.MustRegister(SyncPodsLatency)
|
||||
prometheus.MustRegister(PodWorkerStartLatency)
|
||||
prometheus.MustRegister(ContainersPerPodCount)
|
||||
prometheus.MustRegister(DockerOperations)
|
||||
|
@ -103,10 +103,7 @@ func GetKubeletLatencyMetrics(ms metrics.KubeletMetrics) KubeletLatencyMetrics {
|
||||
latencyMethods := sets.NewString(
|
||||
kubeletmetrics.PodWorkerLatencyKey,
|
||||
kubeletmetrics.PodWorkerStartLatencyKey,
|
||||
kubeletmetrics.SyncPodsLatencyKey,
|
||||
kubeletmetrics.PodStartLatencyKey,
|
||||
kubeletmetrics.PodStatusLatencyKey,
|
||||
kubeletmetrics.ContainerManagerOperationsKey,
|
||||
kubeletmetrics.CgroupManagerOperationsKey,
|
||||
kubeletmetrics.DockerOperationsLatencyKey,
|
||||
kubeletmetrics.PodWorkerStartLatencyKey,
|
||||
|
Loading…
Reference in New Issue
Block a user