The Now Platform® Washington DC release is live. Watch now!
‎02-01-2022 01:54 PM
Hello,
I am dealing with the issue where existing CIs duplicate relationships are causing the SN Discovery to fail to update a scanned CI.
Does anyone happen to know how to query CMDB CI relationships table (cmdb_rel_ci) and produce a report to list all duplicate CI relationships?
Thank you!
‎02-01-2022 02:17 PM
Here's a previous post similar to yours. The script that answers your question (reply from
var gaDupCheck = new GlideAggregate('cmdb_rel_ci');
gaDupCheck.groupBy('parent');
gaDupCheck.groupBy('child');
gaDupCheck.groupBy('type');
gaDupCheck.addHaving('COUNT', '>', 1);
Frank
‎02-01-2022 03:07 PM
Thank you Frank for the prompt response!
Do you happen to know, which group/role can work with GlideAggregate/create the scripts?
Is it CMDB Admin team?
Thank you!
‎02-02-2022 04:01 AM
The CMDB Admin team probably has authority to create scripts, or they will know who in your organization does have that authority.
Frank
‎02-03-2022 06:05 AM
Hi Sergei,
This question inspired me to write a short blog post on "how to find duplicate CI relationships without scripting". You can find the post here: https://datacontentmanager.com/best-way-to-find-duplicate-ci-relationships
If you want to know more or give it a try yourself, you can reach out to me via the same link.
Cheers,
--Mikko