Transform Map to Compare Loaded Data with CI's IP address

bharris
Tera Contributor

I am loading some data into our CMDB from a third party application that has a server name, IP and some other information that isn't in our CMDB.  I am using the IP address as the coalesce field.  The IP addresses for these items in the CMDB are not held in the main CI's IP address field, but in the cmdb_ci_ip_address table.  What is the best way to set up the field map to compare the loaded data's IP address with the IP address for our CIs so it doesn't make doubles of the items?  I tried to set it in the field map, but when I run the transform it skips everything.

 

On field map screen.  I have the target lookup being the ip address table and selecting the IP address.  I would think it should look there, make a match and then update any additional information OR add any CIs that are missing in our CMDB vs what is in the data export.

bharris_0-1793370721492.png

 

 

Thanks!

10 REPLIES 10

vaishali231
Mega Sage

Hey @bharris 

The issue is that cmdb_ci_ip_address is a related table, not the main CI table. Standard Transform Map coalesce does not automatically follow the reference from the IP address record to its parent CI.

I recommend using IRE (Identification and Reconciliation Engine) with CMDBTransformUtil in an onBefore Transform Script.

Configure the identification rule to identify the CI using its associated IP address, and pass the IP address as a related item in the IRE payload.

This allows ServiceNow to identify existing CIs, update matching records, and create new CIs when no match is found, while avoiding duplicate CI creation.

Also, verify that each IP address is correctly associated with its parent CI in cmdb_ci_ip_address.

*******************************************************************************************************************************

If this response helps, please mark it as Accept as Solution and Helpful.

Doing so helps others in the community and encourages me to keep contributing.

Regards

Vaishali Singh
Linkedin - https://www.linkedin.com/in/vaishali-singh-2273361bb





How would I go about doing that?  I am looking through the transform scripts and I'm not seeing where I can use an "onBefore" script.

Hello @bharris   ,

 

You can achieve this using an onBefore Transform Map script. First, check whether the IP address from source.ip_address already exists in the cmdb_ci_ip_address table. If it exists, retrieve the associated CI and update that CI with the additional information. If it doesn't exist,then create an IP address record linked to your CI. This way, you can avoid creating duplicate CIs based on the IP address.

However, for a standard CMDB integration, I would recommend considering IRE instead of implementing the entire identification logic manually.

 

If this helps you then mark it as helpful and accept as solution .

Regards,
Aditya

Would you happen to have scripts for that or how I would need to set this up?