Transform Map to Compare Loaded Data with CI's IP address
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday - last edited Thursday
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Friday
Would you happen to have scripts for that or how I would need to set this up?