nice find here, pct should be float

This commit is contained in:
Cody Lee 2024-04-03 18:41:34 -05:00
parent f372ddd3b6
commit cfd35ddf67
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -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 {
output["storage_"+sanitizeName(t.Name)+"_pct"] = t.Used.Val / t.Size.Val * 100 //nolint:gomnd
} else {
output["storage_"+sanitizeName(t.Name)+"_pct"] = 0
output["storage_"+sanitizeName(t.Name)+"_pct"] = float64(0)
}
}