From 66275ecf74608ab6b7b41c8b1a65694413a84b0d Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Tue, 22 Feb 2022 15:50:49 +0100 Subject: [PATCH] DiskstatCollector: cast part_max_used metric to int --- collectors/diskstatMetric.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collectors/diskstatMetric.go b/collectors/diskstatMetric.go index 819a1ab..16c70ba 100644 --- a/collectors/diskstatMetric.go +++ b/collectors/diskstatMetric.go @@ -102,7 +102,7 @@ func (m *DiskstatCollector) Read(interval time.Duration, output chan lp.CCMetric part_max_used = perc } } - y, err := lp.New("part_max_used", map[string]string{"type": "node"}, m.meta, map[string]interface{}{"value": part_max_used}, time.Now()) + y, err := lp.New("part_max_used", map[string]string{"type": "node"}, m.meta, map[string]interface{}{"value": int(part_max_used)}, time.Now()) if err == nil { y.AddMeta("unit", "percent") output <- y