mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #69099 from ehashman/issue-66790
Rename cadvisor metric labels to match instrumentation guidelines
This commit is contained in:
commit
2f2945732b
@ -39,7 +39,13 @@ var ProberResults = prometheus.NewGaugeVec(
|
||||
Name: "probe_result",
|
||||
Help: "The result of a liveness or readiness probe for a container.",
|
||||
},
|
||||
[]string{"probe_type", "container_name", "pod_name", "namespace", "pod_uid"},
|
||||
[]string{"probe_type",
|
||||
"container_name",
|
||||
"container",
|
||||
"pod_name",
|
||||
"pod",
|
||||
"namespace",
|
||||
"pod_uid"},
|
||||
)
|
||||
|
||||
// Manager manages pod probing. It creates a probe "worker" for every container that specifies a
|
||||
|
@ -101,7 +101,9 @@ func newWorker(
|
||||
w.proberResultsMetricLabels = prometheus.Labels{
|
||||
"probe_type": w.probeType.String(),
|
||||
"container_name": w.container.Name,
|
||||
"container": w.container.Name,
|
||||
"pod_name": w.pod.Name,
|
||||
"pod": w.pod.Name,
|
||||
"namespace": w.pod.Namespace,
|
||||
"pod_uid": string(w.pod.UID),
|
||||
}
|
||||
|
@ -865,8 +865,10 @@ func containerPrometheusLabelsFunc(s stats.StatsProvider) metrics.ContainerLabel
|
||||
metrics.LabelName: name,
|
||||
metrics.LabelImage: image,
|
||||
"pod_name": podName,
|
||||
"pod": podName,
|
||||
"namespace": namespace,
|
||||
"container_name": containerName,
|
||||
"container": containerName,
|
||||
}
|
||||
return set
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user