Merge pull request #69099 from ehashman/issue-66790

Rename cadvisor metric labels to match instrumentation guidelines
This commit is contained in:
Kubernetes Prow Robot 2019-02-22 14:56:01 -08:00 committed by GitHub
commit 2f2945732b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View File

@ -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

View File

@ -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),
}

View File

@ -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
}