Move kubelet metrics to histogram metrics

This commit is contained in:
danielqsj 2019-01-02 11:04:25 +08:00
parent 9fd99a48f5
commit 0e9515c709

View File

@ -93,45 +93,45 @@ var (
}, },
[]string{NodeLabelKey}, []string{NodeLabelKey},
) )
ContainersPerPodCount = prometheus.NewSummary( ContainersPerPodCount = prometheus.NewHistogram(
prometheus.SummaryOpts{ prometheus.HistogramOpts{
Subsystem: KubeletSubsystem, Subsystem: KubeletSubsystem,
Name: "containers_per_pod_count", Name: "containers_per_pod_count",
Help: "The number of containers per pod.", Help: "The number of containers per pod.",
}, },
) )
PodWorkerLatency = prometheus.NewSummaryVec( PodWorkerLatency = prometheus.NewHistogramVec(
prometheus.SummaryOpts{ prometheus.HistogramOpts{
Subsystem: KubeletSubsystem, Subsystem: KubeletSubsystem,
Name: PodWorkerLatencyKey, Name: PodWorkerLatencyKey,
Help: "Latency in seconds to sync a single pod. Broken down by operation type: create, update, or sync", Help: "Latency in seconds to sync a single pod. Broken down by operation type: create, update, or sync",
}, },
[]string{"operation_type"}, []string{"operation_type"},
) )
PodStartLatency = prometheus.NewSummary( PodStartLatency = prometheus.NewHistogram(
prometheus.SummaryOpts{ prometheus.HistogramOpts{
Subsystem: KubeletSubsystem, Subsystem: KubeletSubsystem,
Name: PodStartLatencyKey, Name: PodStartLatencyKey,
Help: "Latency in seconds for a single pod to go from pending to running.", Help: "Latency in seconds for a single pod to go from pending to running.",
}, },
) )
CgroupManagerLatency = prometheus.NewSummaryVec( CgroupManagerLatency = prometheus.NewHistogramVec(
prometheus.SummaryOpts{ prometheus.HistogramOpts{
Subsystem: KubeletSubsystem, Subsystem: KubeletSubsystem,
Name: CgroupManagerOperationsKey, Name: CgroupManagerOperationsKey,
Help: "Latency in seconds for cgroup manager operations. Broken down by method.", Help: "Latency in seconds for cgroup manager operations. Broken down by method.",
}, },
[]string{"operation_type"}, []string{"operation_type"},
) )
PodWorkerStartLatency = prometheus.NewSummary( PodWorkerStartLatency = prometheus.NewHistogram(
prometheus.SummaryOpts{ prometheus.HistogramOpts{
Subsystem: KubeletSubsystem, Subsystem: KubeletSubsystem,
Name: PodWorkerStartLatencyKey, Name: PodWorkerStartLatencyKey,
Help: "Latency in seconds from seeing a pod to starting a worker.", Help: "Latency in seconds from seeing a pod to starting a worker.",
}, },
) )
PLEGRelistLatency = prometheus.NewSummary( PLEGRelistLatency = prometheus.NewHistogram(
prometheus.SummaryOpts{ prometheus.HistogramOpts{
Subsystem: KubeletSubsystem, Subsystem: KubeletSubsystem,
Name: PLEGRelistLatencyKey, Name: PLEGRelistLatencyKey,
Help: "Latency in seconds for relisting pods in PLEG.", Help: "Latency in seconds for relisting pods in PLEG.",
@ -145,8 +145,8 @@ var (
}, },
[]string{}, []string{},
) )
PLEGRelistInterval = prometheus.NewSummary( PLEGRelistInterval = prometheus.NewHistogram(
prometheus.SummaryOpts{ prometheus.HistogramOpts{
Subsystem: KubeletSubsystem, Subsystem: KubeletSubsystem,
Name: PLEGRelistIntervalKey, Name: PLEGRelistIntervalKey,
Help: "Interval in seconds between relisting in PLEG.", Help: "Interval in seconds between relisting in PLEG.",
@ -161,8 +161,8 @@ var (
}, },
[]string{"operation_type"}, []string{"operation_type"},
) )
RuntimeOperationsLatency = prometheus.NewSummaryVec( RuntimeOperationsLatency = prometheus.NewHistogramVec(
prometheus.SummaryOpts{ prometheus.HistogramOpts{
Subsystem: KubeletSubsystem, Subsystem: KubeletSubsystem,
Name: RuntimeOperationsLatencyKey, Name: RuntimeOperationsLatencyKey,
Help: "Latency in seconds of runtime operations. Broken down by operation type.", Help: "Latency in seconds of runtime operations. Broken down by operation type.",
@ -177,8 +177,8 @@ var (
}, },
[]string{"operation_type"}, []string{"operation_type"},
) )
EvictionStatsAge = prometheus.NewSummaryVec( EvictionStatsAge = prometheus.NewHistogramVec(
prometheus.SummaryOpts{ prometheus.HistogramOpts{
Subsystem: KubeletSubsystem, Subsystem: KubeletSubsystem,
Name: EvictionStatsAgeKey, Name: EvictionStatsAgeKey,
Help: "Time between when stats are collected, and when pod is evicted based on those stats by eviction signal", Help: "Time between when stats are collected, and when pod is evicted based on those stats by eviction signal",
@ -193,8 +193,8 @@ var (
}, },
[]string{"resource_name"}, []string{"resource_name"},
) )
DevicePluginAllocationLatency = prometheus.NewSummaryVec( DevicePluginAllocationLatency = prometheus.NewHistogramVec(
prometheus.SummaryOpts{ prometheus.HistogramOpts{
Subsystem: KubeletSubsystem, Subsystem: KubeletSubsystem,
Name: DevicePluginAllocationLatencyKey, Name: DevicePluginAllocationLatencyKey,
Help: "Latency in seconds to serve a device plugin Allocation request. Broken down by resource name.", Help: "Latency in seconds to serve a device plugin Allocation request. Broken down by resource name.",