Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

CI Identifiers for ESX servers

klautrup
Kilo Expert

Hi,

We are configuring a custom integration (from HP uCMDB) retrieving windows, linux and esx servers to the CMDB tables cmdb_cI_win_server, cmdb_ci_linux_server and cmdb_ci_esx_server.

In all 3 transform maps instead of using the coalesce option we have this onBefore script to have the transforms use the default CI Identifier rules:

(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {

// Identification and Reconcilliaton

var cmdbUtil = new CMDBTransformUtil();

cmdbUtil.identifyAndReconcile(source, map, log);

ignore = true;

if (cmdbUtil.hasError()) {

              var errorMessage = cmdbUtil.getError();

              log.error(errorMessage);

} else {

              log.info('IE Output Payload: ' + cmdbUtil.getOutputPayload());

              log.info('Imported CI: ' + cmdbUtil.getOutputRecordSysId());

}

})(source, map, log, target);

For the transform maps for the linux + windows servers this works like a charm using the default 'Hardware Rule' (parent cmdb_ci_hardware table) CI Identifier rule first trying to match on cmdb_serial_number.serial_number then on cmdb_ci_hardware.serial_number and finally on cmdb_ci_hardware.name.


However, for the ESX transform map we get errors like this in the system log:

find_real_file.png

Looking at the cmdb_ci_esx_server table it is actually extended from cmdb_ci_vcenter_server_obj which again extends from cmdb_ci_virtualization_server (all though cmdb_ci_esx_server also appears to extend from cmdb_ci_server like cmdb_ci_win_server and cmdb_ci_linux_server):

find_real_file.png

cmdb_ci_virtualization_server has its own CI Identifier rule named 'Virtualization Server'.

Like the CI Identifier 'Hardware Rule' the 'Virtualization Server' rule first trying to match on cmdb_serial_nuber.serial_number then on cmdb_ci_virtualization_server.serial_number and finally on cmdb_ci_virtualization.name rule.


However, it don't understand why we get the errors in the system log for the ESX transformation?

I assume that if the ESX servers are not able to match by Serial number or Name against the CI Identifier Rule since table cmdb_ci_virtualization_server extends table cmdb_ci_server which extends cmdb_ci_hardware then if no match using the 'Virtualization Server' CI Identifier rule it would continue to try to match against parent CI Identifier 'Hardware Rule'.

I get the error both when there are no matching server CIs and when I manually create a matching CI in cmdb_ci_esx_server (matching both 'Name' + 'Serial number').

If I try to change the ESX transform map to use target table 'cmdb_ci_linux_server' instead of 'cmdb_ci_esx_server' I don't see the system log errors.

1 ACCEPTED SOLUTION

klautrup
Kilo Expert

Ok I missed there is also an CI Identifier rule named 'ESX Server Rule' for the cmdb_ci_esx_server table trying to match on 'correlation id'.
Since 'correlation id' is not part of our custom integration I have disabled that rule which removed the system log errors.


View solution in original post

1 REPLY 1

klautrup
Kilo Expert

Ok I missed there is also an CI Identifier rule named 'ESX Server Rule' for the cmdb_ci_esx_server table trying to match on 'correlation id'.
Since 'correlation id' is not part of our custom integration I have disabled that rule which removed the system log errors.