mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-09 23:24:09 -08:00
meminfo: use bytes, fix type conversion bug.
This commit is contained in:
parent
a10ab2c102
commit
c651d7ccd9
|
@ -91,7 +91,7 @@ func (c *meminfoCollector) Update(ch chan<- prometheus.Metric) (err error) {
|
|||
})
|
||||
}
|
||||
// Convert metrics to kB ( same as Linux meminfo)
|
||||
c.metrics[k].Set(float64(v * size / 1024))
|
||||
c.metrics[k].Set(float64(v) * float64(size))
|
||||
c.metrics[k].Collect(ch)
|
||||
}
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue