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

@@ -14,7 +14,7 @@ var pidMetrics = []*metric{
help: "The limit to the number of pids allowed",
unit: metrics.Unit("limit"),
vt: prometheus.GaugeValue,
getValues: func(stats *cgroups.Stats) []value {
getValues: func(stats *cgroups.Metrics) []value {
if stats.Pids == nil {
return nil
}
@@ -30,7 +30,7 @@ var pidMetrics = []*metric{
help: "The current number of pids",
unit: metrics.Unit("current"),
vt: prometheus.GaugeValue,
getValues: func(stats *cgroups.Stats) []value {
getValues: func(stats *cgroups.Metrics) []value {
if stats.Pids == nil {
return nil
}