Duplication of CI's
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2012 06:34 AM
Hi,
Would anyone be able to assist me with the following query:
It seems that we are getting duplication of CI's when we run discovery. For example the Windows Server CI was discovered using WMI and the same Virtual Machine CI is also discovered using VCentre. Is there anyway in which we could consolidate this?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2012 03:04 PM
That actually should not happen.. if you can PM me the instance and an example I can take a quick look..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2012 08:14 AM
What was the issue here? We have the same problem and would like to clean it up. we want to know that it's a VM and the relationships, but it tends to confuse things when people are searching for affected CIs and find multiple records with the same name.
Please let me know.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2012 12:57 PM
Hi,
It seems as though we are having the same issue. When we displayed the bsm map to the customer that we are implementing discovery and config management for, they where happy with the relationships and they way it was set up. This still left us with the issue of users selecting the incorrect CI when logging incidents or adding affected CI's on changes.
What we decided to do as a work around was to add filters for the classes we want users to log incidents or add affected CI's against. Although this did slow the loading of the slush bucket significantly. But at least then we ensured that users use the correct CI's
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2012 02:56 PM
What IP Idendifiers are you using to match CI records?
We use the serial number as our database KEY
You might need to shut off, reduce or in our case match on both serial tables (CMDB CI and Discovery).
* The CMDB has a hardware serial number tables 'cmdb_serial_number' and Discovery has a different table 'discoveredSerials'.
Depending on how you are configured it could create a duplicate CI record depending on how or what you match on.
The out of box discovery identifier gives you the option to customize the order. We added both serial number matches. The next problem comes down to access and cridentials. Do I collect a serial number? If not it could use a different IP Identifer and create another CI Record. It's not an easy fix for Serice-now because every environment and access is different
Issue and Fix
We had CI corruption because the SN Discovery tool stores serial number in table= discoveredSerials and the CMDB uses a hardware serial number table ='cmdb_serial_number'
We do a match on ether serial number before creating. If it exsist we update the CI Record
This has elimitnated our CI duplication corruption we experienced.
So... I think the problem could be that Discovery is finding a CI and recording the serial number in its DiscoverySerial table and vCenter is storing its serial number in a different table. The two will not match and a duplicate is create.
Here is our script: Check your logs and see what you are matching on. You might need to modify and add the vCenter serial table to the Identifer
Thanks,
Glenn Iverson
--------------------------------------------------------
IP Classification (Identifiers)
function(ciData, log, identifier) {
var discoveredSerials = getDiscoveredSerials(ciData);
var matching = matchingCIs(discoveredSerials, ciData);
return new CIIdentifierResult(matching, discoveredSerials.length > 0);
function matchingCIs(discoveredSerials, ciData) {
var matches = [];
// If there's no discovered serial numbers, skip the lookup
if (discoveredSerials.length == 0)
return matches;
// find matches for all valid serials in the serial number table...
var gr = new GlideAggregate('cmdb_serial_number');
gr.addEncodedQuery(buildEncodedQuery(discoveredSerials));
gr.addAggregate('COUNT', 'cmdb_ci');
gr.addQuery('valid', 'true');
gr.addQuery('absent', 'false');
gr.groupBy('cmdb_ci');
gr.addHaving('COUNT', '=', discoveredSerials.length);
gr.query();
// populate our return value...
while (gr.next())
if (ciData.getData().sys_class_name == gr.cmdb_ci.sys_class_name)
matches.push('' + gr.getValue('cmdb_ci'));
return matches;
}
function buildEncodedQuery(discoveredSerials) {
var conds = [];
for (var i = 0; i < discoveredSerials.length; i++)
conds.push('serial_number=' + discoveredSerials.serial_number + '^serial_number_type=' + discoveredSerials.serial_number_type);
return conds.join('^NQ');
}
function getDiscoveredSerials(ciData) {
var srls = ciData.getRelatedList('cmdb_serial_number', 'cmdb_ci');
var result = [];
for (var i = 0; i < srls.length; i++) {
var srl = srls;
var sn = new Packages.com.snc.discovery.SerialNumber();
if (sn.isValid(srl.serial_number))
result.push(srl);
}
return result;
}
}