This commit is contained in:
Artashes Arabajyan 2018-01-04 12:25:10 +01:00
parent 8b519e50c8
commit ba0b81c0ef
1 changed files with 767 additions and 767 deletions

View File

@ -1,17 +1,17 @@
/* Copyright 2016 Adrian Todorov, Oxalide ato@oxalide.com
Original project author: https://github.com/cblomart
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Original project author: https://github.com/cblomart
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package main
@ -636,7 +636,7 @@ func (vcenter *VCenter) Query(config Configuration, InfluxDBClient influxclient.
}
//create InfluxDB points
pt, err := influxclient.NewPoint(config.InfluxDB.Prefix + entityName, tags, fields, nowTime)
pt, err := influxclient.NewPoint(config.InfluxDB.Prefix+entityName, tags, fields, nowTime)
if err != nil {
errlog.Println(err)
continue
@ -646,7 +646,7 @@ func (vcenter *VCenter) Query(config Configuration, InfluxDBClient influxclient.
for measurement, v := range specialFields {
for name, metric := range v {
for instance, value := range metric {
pt2, err := influxclient.NewPoint(config.InfluxDB.Prefix + measurement, specialTags[measurement][name][instance], value, time.Now())
pt2, err := influxclient.NewPoint(config.InfluxDB.Prefix+measurement, specialTags[measurement][name][instance], value, time.Now())
if err != nil {
errlog.Println(err)
continue
@ -669,7 +669,7 @@ func (vcenter *VCenter) Query(config Configuration, InfluxDBClient influxclient.
"memory_limit": pool.Config.MemoryAllocation.GetResourceAllocationInfo().Limit,
}
respoolTags := map[string]string{"pool_name": pool.Name}
pt3, err := influxclient.NewPoint(config.InfluxDB.Prefix + "resourcepool", respoolTags, respoolFields, time.Now())
pt3, err := influxclient.NewPoint(config.InfluxDB.Prefix+"resourcepool", respoolTags, respoolFields, time.Now())
if err != nil {
errlog.Println(err)
continue
@ -683,7 +683,7 @@ func (vcenter *VCenter) Query(config Configuration, InfluxDBClient influxclient.
"free_space": datastore.Summary.FreeSpace,
}
datastoreTags := map[string]string{"ds_name": datastore.Summary.Name, "host": vcName}
pt4, err := influxclient.NewPoint(config.InfluxDB.Prefix + "datastore", datastoreTags, datastoreFields, time.Now())
pt4, err := influxclient.NewPoint(config.InfluxDB.Prefix+"datastore", datastoreTags, datastoreFields, time.Now())
if err != nil {
errlog.Println(err)
continue