From 0110547b68c3299f103e1063ec7e379fd4344399 Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Thu, 25 Mar 2021 15:53:43 +0100 Subject: [PATCH] Add load_five and load_fifteen to LoadavgCollector --- collectors/loadavgMetric.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/collectors/loadavgMetric.go b/collectors/loadavgMetric.go index 63f7c78..2e27794 100644 --- a/collectors/loadavgMetric.go +++ b/collectors/loadavgMetric.go @@ -29,6 +29,10 @@ func (m *LoadavgCollector) Read(interval time.Duration){ ls := strings.Split(string(buffer), ` `) loadOne, _ := strconv.ParseFloat(ls[0], 64) m.node["load_one"] = float64(loadOne) + loadFive, _ := strconv.ParseFloat(ls[1], 64) + m.node["load_five"] = float64(loadFive) + loadFifteen, _ := strconv.ParseFloat(ls[2], 64) + m.node["load_fifteen"] = float64(loadFifteen) } func (m *LoadavgCollector) Close() {