cpu_core_thread is not populated for ESX server


Description

Field "cpu_core_thread" has no value for ESX server records in table "cmdb_ci_esx_server"

Steps to Reproduce

  1. Run a vCenter discovery.
  2. Check the ESX server record.

The cpu_core_thread column is empty.

Workaround

Add the following line in VCenterESXHostsSensor fixVirtualizes() function


if(JSUtil.notNil(esx.logical_processor) && JSUtil.notNil(esx.cpu_count) && JSUtil.notNil(esx.cpu_core_count))  

esx.cpu_core_thread = esx.logical_processor / (esx.cpu_count * esx.cpu_core_count);


ie:

function fixupEsx(esx) {
 var mm, cluster;

 esx.name = hostname.format(esx.name);
 esx.dns_domain = hostname.getDomainName();

 if(JSUtil.notNil(esx.logical_processor) && JSUtil.notNil(esx.cpu_count) && JSUtil.notNil(esx.cpu_core_count))
  esx.cpu_core_thread = esx.logical_processor / (esx.cpu_count * esx.cpu_core_count);

 esx.vcenter_ref = vCenterSysId;
 esx.vcenter_uuid = vCenterUuid;
 
 esx.os = 'ESX';

......


Related Problem: PRB1484803