From 39330e4d31d37a006c225f518c3c8699c873d441 Mon Sep 17 00:00:00 2001 From: MicKBfr Date: Fri, 6 Apr 2018 09:40:32 +0200 Subject: [PATCH] Remove domain from esx name Domain in esx name can be a problem with influxgraph and grafana. --- vsphere-influxdb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vsphere-influxdb.go b/vsphere-influxdb.go index db42bad..b1cb6e6 100644 --- a/vsphere-influxdb.go +++ b/vsphere-influxdb.go @@ -443,7 +443,7 @@ func (vcenter *VCenter) Query(config Configuration, InfluxDBClient influxclient. // Extra tags per host hostSummary[host.Self] = make(map[string]string) - hostSummary[host.Self]["name"] = host.Summary.Config.Name + hostSummary[host.Self]["name"] = strings.Replace(host.Summary.Config.Name, config.Domain, "", -1) hostSummary[host.Self]["cluster"] = hostToCluster[host.Self] // Extra metrics per host