Browse Source

Merge pull request #81 from krische/master

Compute usage percentage of datastore.
pull/93/head
Adrian Todorov 3 years ago
committed by GitHub
parent
commit
57703fa0b3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      vsphere-influxdb.go

1
vsphere-influxdb.go

@ -719,6 +719,7 @@ func (vcenter *VCenter) Query(config Configuration, InfluxDBClient influxclient.
datastoreFields := map[string]interface{}{
"capacity": datastore.Summary.Capacity,
"free_space": datastore.Summary.FreeSpace,
"usage": 1.0 - (float64(datastore.Summary.FreeSpace)/float64(datastore.Summary.Capacity)),
}
datastoreTags := map[string]string{"ds_name": datastore.Summary.Name, "host": vcName}
pt4, err := influxclient.NewPoint(config.InfluxDB.Prefix+"datastore", datastoreTags, datastoreFields, time.Now())

Loading…
Cancel
Save