Use cgroups proto for prom metrics

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-09-05 13:05:54 -04:00
parent 0973a084cf
commit ed45952826
9 changed files with 92 additions and 82 deletions

View File

@@ -15,7 +15,7 @@ var hugetlbMetrics = []*metric{
unit: metrics.Bytes,
vt: prometheus.GaugeValue,
labels: []string{"page"},
getValues: func(stats *cgroups.Stats) []value {
getValues: func(stats *cgroups.Metrics) []value {
if stats.Hugetlb == nil {
return nil
}
@@ -35,7 +35,7 @@ var hugetlbMetrics = []*metric{
unit: metrics.Total,
vt: prometheus.GaugeValue,
labels: []string{"page"},
getValues: func(stats *cgroups.Stats) []value {
getValues: func(stats *cgroups.Metrics) []value {
if stats.Hugetlb == nil {
return nil
}
@@ -55,7 +55,7 @@ var hugetlbMetrics = []*metric{
unit: metrics.Bytes,
vt: prometheus.GaugeValue,
labels: []string{"page"},
getValues: func(stats *cgroups.Stats) []value {
getValues: func(stats *cgroups.Metrics) []value {
if stats.Hugetlb == nil {
return nil
}