Fixed cpu count and cpu usage reporting on node.
This commit is contained in:
@@ -248,6 +248,8 @@ func (c *PveNodeStatusCollector) CollectMetrics() error {
|
|||||||
return err
|
return err
|
||||||
} else {
|
} else {
|
||||||
c.state.With(labels).Set(float64(node.Online))
|
c.state.With(labels).Set(float64(node.Online))
|
||||||
|
c.cpus.With(labels).Set(float64(status.CPUInfo.CPUs))
|
||||||
|
c.cpuUsage.With(labels).Set(float64(status.CPU))
|
||||||
c.uptime.With(labels).Set(float64(status.Uptime))
|
c.uptime.With(labels).Set(float64(status.Uptime))
|
||||||
c.memBytes.With(labels).Set(float64(status.Memory.Total))
|
c.memBytes.With(labels).Set(float64(status.Memory.Total))
|
||||||
c.memBytesUsed.With(labels).Set(float64(status.Memory.Used))
|
c.memBytesUsed.With(labels).Set(float64(status.Memory.Used))
|
||||||
|
|||||||
Reference in New Issue
Block a user