nice find here, pct should be float
This commit is contained in:
parent
f372ddd3b6
commit
cfd35ddf67
|
|
@ -71,7 +71,7 @@ func (u *InfluxUnifi) batchUDMstorage(storage []*unifi.Storage) map[string]any {
|
||||||
if t.Size.Val != 0 && t.Used.Val != 0 && t.Used.Val < t.Size.Val {
|
if t.Size.Val != 0 && t.Used.Val != 0 && t.Used.Val < t.Size.Val {
|
||||||
output["storage_"+sanitizeName(t.Name)+"_pct"] = t.Used.Val / t.Size.Val * 100 //nolint:gomnd
|
output["storage_"+sanitizeName(t.Name)+"_pct"] = t.Used.Val / t.Size.Val * 100 //nolint:gomnd
|
||||||
} else {
|
} else {
|
||||||
output["storage_"+sanitizeName(t.Name)+"_pct"] = 0
|
output["storage_"+sanitizeName(t.Name)+"_pct"] = float64(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue