Add load_five and load_fifteen to LoadavgCollector

This commit is contained in:
Thomas Roehl 2021-03-25 15:53:43 +01:00
parent a08af3b050
commit 0110547b68

View File

@ -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() {