Adding ContainersPerPodCount metric.

This will let us know the composition of pods in clusters.
This commit is contained in:
Victor Marmol
2015-02-26 09:25:01 -08:00
parent 014156195c
commit 556acc792b
2 changed files with 13 additions and 2 deletions

View File

@@ -36,7 +36,13 @@ var (
Help: "Image pull latency in microseconds.",
},
)
// TODO(vmarmol): Break down by number of containers in pod?
ContainersPerPodCount = prometheus.NewSummary(
prometheus.SummaryOpts{
Subsystem: kubeletSubsystem,
Name: "containers_per_pod_count",
Help: "The number of containers per pod.",
},
)
SyncPodLatency = prometheus.NewSummaryVec(
prometheus.SummaryOpts{
Subsystem: kubeletSubsystem,
@@ -52,7 +58,6 @@ var (
Help: "Latency in microseconds to sync all pods.",
},
)
// TODO(vmarmol): Containers per pod
DockerOperationsLatency = prometheus.NewSummaryVec(
prometheus.SummaryOpts{
Subsystem: kubeletSubsystem,
@@ -73,6 +78,7 @@ func Register(containerCache dockertools.DockerCache) {
prometheus.MustRegister(SyncPodLatency)
prometheus.MustRegister(DockerOperationsLatency)
prometheus.MustRegister(SyncPodsLatency)
prometheus.MustRegister(ContainersPerPodCount)
prometheus.MustRegister(newPodAndContainerCollector(containerCache))
})
}