mirror of
https://github.com/rwinkhart/uni-nut.git
synced 2026-09-02 06:57:26 -04:00
nutcollector: don't initialize missing metrics to zero
This commit is contained in:
@@ -148,9 +148,6 @@ func (c *nutCollector) readNUT(conn *nut.Client, name string, ch chan<- promethe
|
|||||||
}
|
}
|
||||||
labels := map[string]string{}
|
labels := map[string]string{}
|
||||||
values := map[string]float64{}
|
values := map[string]float64{}
|
||||||
for k := range descriptions {
|
|
||||||
values[k] = 0
|
|
||||||
}
|
|
||||||
for k, v := range vars {
|
for k, v := range vars {
|
||||||
switch k {
|
switch k {
|
||||||
case "device.model", "device.mfr", "device.serial", "device.type":
|
case "device.model", "device.mfr", "device.serial", "device.type":
|
||||||
|
|||||||
Reference in New Issue
Block a user