diff --git a/plugins/inputs/vsphere/endpoint.go b/plugins/inputs/vsphere/endpoint.go index 49c875d93..9c1837713 100644 --- a/plugins/inputs/vsphere/endpoint.go +++ b/plugins/inputs/vsphere/endpoint.go @@ -439,7 +439,7 @@ func (e *Endpoint) discover(ctx context.Context) error { } // Fill in datacenter names where available (no need to do it for Datacenters) - if res.name != "Datacenter" { + if res.name != "datacenter" { for k, obj := range objects { if obj.parentRef != nil { obj.dcname, _ = e.getDatacenterName(ctx, client, dcNameCache, *obj.parentRef)