I have recently installed the vSphere module for Beats. And I noticed a strange inconsistency regarding the "host" fields:
- In the "host" metricset:
- In the "virtualmachine" metricset:
It looks like the "vsphere.host.name" is using the actual hostname, and "vsphere.virtualmachine.host" is using the internal host ID (or, to be more specific, the managed object ID/managed object reference).
While it isn't difficult to map the two together manually, this requires an additional step in order to aggregate data from VMs running on the same host. Also, it seems to contradict the documentation, which specifically lists the "vsphere.virtualmachine.host" field as "hostname".
Looking at the code, the host code pulls hs.Summary.Config.Name (HostSystem.Summary.Config.Name - a string containing the host name), while the virtualmachine code pulls vm.Summary.Runtime.Host.Value (HostSystem.Value, which seems to return the host ID. Shouldn't this one also be vm.Summary.Runtime.Host.Summary.Config.Name?)
Am I missing something? Is there anything I need to configure so that the two fields contain the same thing (a host name)? If not, is there any chance this could be changed in a future release of the Beats module?