master
go 13 lines 394 Bytes
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 package powervault
4
5 // collectSystemHealth reports overall system health.
6 // Uses cached discovery data — no API calls.
7 // health-numeric: 0=OK, 1=Degraded, 2=Fault, 3=Unknown.
8 func (c *Collector) collectSystemHealth() {
9 if len(c.discovered.system) == 0 {
10 return
11 }
12 c.mx.system.health.Observe(float64(c.discovered.system[0].HealthNumeric))
13 }