vendor: cadvisor v0.39.0
Main upgrades: - github.com/opencontainers/runc v1.0.0-rc93 - github.com/containerd/containerd v1.4.4 - github.com/docker/docker v20.10.2 - github.com/mrunalp/fileutils v0.5.0 - github.com/opencontainers/selinux v1.8.0 - github.com/cilium/ebpf v0.2.0
This commit is contained in:
32
vendor/github.com/google/cadvisor/metrics/prometheus.go
generated
vendored
32
vendor/github.com/google/cadvisor/metrics/prometheus.go
generated
vendored
@@ -455,6 +455,16 @@ func NewPrometheusCollector(i infoProvider, f ContainerLabelsFunc, includedMetri
|
||||
},
|
||||
}...)
|
||||
}
|
||||
if includedMetrics.Has(container.CPUSetMetrics) {
|
||||
c.containerMetrics = append(c.containerMetrics, containerMetric{
|
||||
name: "container_memory_migrate",
|
||||
help: "Memory migrate status.",
|
||||
valueType: prometheus.GaugeValue,
|
||||
getValues: func(s *info.ContainerStats) metricValues {
|
||||
return metricValues{{value: float64(s.CpuSet.MemoryMigrate), timestamp: s.Timestamp}}
|
||||
},
|
||||
})
|
||||
}
|
||||
if includedMetrics.Has(container.MemoryNumaMetrics) {
|
||||
c.containerMetrics = append(c.containerMetrics, []containerMetric{
|
||||
{
|
||||
@@ -757,6 +767,28 @@ func NewPrometheusCollector(i infoProvider, f ContainerLabelsFunc, includedMetri
|
||||
}, s.Timestamp)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "container_blkio_device_usage_total",
|
||||
help: "Blkio Device bytes usage",
|
||||
valueType: prometheus.CounterValue,
|
||||
extraLabels: []string{"device", "major", "minor", "operation"},
|
||||
getValues: func(s *info.ContainerStats) metricValues {
|
||||
var values metricValues
|
||||
for _, diskStat := range s.DiskIo.IoServiceBytes {
|
||||
for operation, value := range diskStat.Stats {
|
||||
values = append(values, metricValue{
|
||||
value: float64(value),
|
||||
labels: []string{diskStat.Device,
|
||||
strconv.Itoa(int(diskStat.Major)),
|
||||
strconv.Itoa(int(diskStat.Minor)),
|
||||
operation},
|
||||
timestamp: s.Timestamp,
|
||||
})
|
||||
}
|
||||
}
|
||||
return values
|
||||
},
|
||||
},
|
||||
}...)
|
||||
}
|
||||
if includedMetrics.Has(container.NetworkUsageMetrics) {
|
||||
|
16
vendor/github.com/google/cadvisor/metrics/prometheus_fake.go
generated
vendored
16
vendor/github.com/google/cadvisor/metrics/prometheus_fake.go
generated
vendored
@@ -524,6 +524,21 @@ func (p testSubcontainersInfoProvider) GetRequestedContainersInfo(string, v2.Req
|
||||
TxQueued: 0,
|
||||
},
|
||||
},
|
||||
DiskIo: info.DiskIoStats{
|
||||
IoServiceBytes: []info.PerDiskStats{{
|
||||
Device: "/dev/sdb",
|
||||
Major: 8,
|
||||
Minor: 0,
|
||||
Stats: map[string]uint64{
|
||||
"Async": 1,
|
||||
"Discard": 2,
|
||||
"Read": 3,
|
||||
"Sync": 4,
|
||||
"Total": 5,
|
||||
"Write": 6,
|
||||
},
|
||||
}},
|
||||
},
|
||||
Filesystem: []info.FsStats{
|
||||
{
|
||||
Device: "sda1",
|
||||
@@ -708,6 +723,7 @@ func (p testSubcontainersInfoProvider) GetRequestedContainersInfo(string, v2.Req
|
||||
},
|
||||
},
|
||||
},
|
||||
CpuSet: info.CPUSetStats{MemoryMigrate: 1},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user