How to set unique key for a ci in discovery?

Venu Suri1
Kilo Contributor

Hi,

I configured mid server and discovery.

While I am doing quick discovery, duplicate ci's going to be added.

Please let me know how to prevent duplicate ci's adding to cmdb table.

Thanks in advance.

 

Regards,

Venu Suri

9 REPLIES 9

If the identification rules find a duplicate it may not insert the newly discovered record. Clean up the duplicate CIs first, enable the OOTB identification rules and then re-run discovery. 

Venu Suri,

If you are using out-of-the-box Identifiers, then you shouldn't need to create a new Identification rule. The Computer [cmdb_ci_computer] table is a child off of the Hardware [cmdb_ci_hardware] table. When Discovery discovers a Computer, the Identify Phase will use the Hardware Rule Identifier for identification.

find_real_file.png

I would recommend temporarily setting the new rule you created to inactive. Validate the Hardware Rule is set to active as shown.

find_real_file.png

Re-discover the CI and go to the Discovery logs to see more details.  The logs which show which Identifier ran as well if there was a Match or No Match.  This is a good place to troubleshoot why you are getting a duplicate.  You can see which Identifier rule and which of the Identifier Entries were run.

In the example shown below, I am discovering a Computer which will be inserted into the Computer [cmdb_ci_computer] table.  During Discovery the Hardware Rule Identifier rule was run.  All 4 of the Identifier Entries were run in Priority Order and all Identifier Entries show a No match.

find_real_file.png

When all 4 Identifier Entires show No Match, a CI is Created.

find_real_file.png

Hi Chuk,

from your experience, i guess you can help here.

im using OOTB ci identifier rules(london), cmdb_hardware. but somehow i can see there are duplicate ci's got created.

and one machine marked as duplicate in discovery source(virtual state is false), other machine getting updated for recent discovery date, discovery source is servicenow.(virtual state is true)

 

Both machines are records been created, in last month at same time... and how can i get to know cause why duplicate ci created. and

how can i prevent it.

how two ci's with different type. one is with virtual - yes but other is with virtual - no.

this is notify, where we have Hyper-v, there is duplicate ci's got created.

correct me if i am wrong here, during hyper-v discovery, two ci should create. one in hyper-v server class & other in windows server class. BUT

in my case, three cis got created, one in hyper-v server class. (thats OK.), one (virtual-yes) windows server class, other (virtual-no) windows class.

is there any bug in london for this. this is something weird behavior of platform. 

 

could you please share your thoughts on this.

Thanks in advance.

Shekhar Deshing
Mega Expert

As per discussion above i am adding some few Information Identifiers 

on Your instance go to CI Class Manager :

Please find the Attachment for Identification adding Rules for Duplicate CI.You can set according to your requirement.

Thanks.

Venu Suri1
Kilo Contributor

Thanks for your response Chuck.

I configured discovery in my dev instance and run the quick discovery by giving ip address.

If I re run the discovery, the same ci creating duplicates in the cmdb _ci_computer table.

I created ci identification rule and deleted all the ci's created in the cmdb_ci_table.

Now i am re running the discovery, this is no ci was created in the cmdb_ci_computer table.

If I made identification rule inactive, then I am able to create ci in the cmdb table.

If I  re run the discovery, duplicate ci's created.

 

Please help me to resolve my issue.

 

Thanks,

Venu Suri