Does anyone know of a way to search for duplicate items in the CMDB. There are occasions where a duplicate record may be created and I need a way to catch them. Either by our internal asset tag (stored in a text field), the serial number or the hostname.
David through SQL
SELECT Barcode, 'Count' = COUNT(*)
GROUP BY barcode
HAVING COUNT(*) > 1
Use a matrix widget
Set your business object as Config Item
Rows as hosted name
Columns as a numeric value
Field used to split HostedName
Search hosted name not empty
Value = number of records
You will probably have to limit your row search as you wouldn't want to pull back your entire CMDB. Maybe set it to Hostname like %FakeName% for testing purposes
I will work on this a little later and try and get back to you. Thought this might get you started. Just extremely busy
I prefer the map table back to itself in a relationship method and setup a dashboard that finds duplicate counts for Asset, MAC, hostname, etc.
Brent's method is exactly what I do as well. You create the relationship where CI links Duplicate CI (1-many) based on (for example) Hostname=hostname. Then you can run a search for CI's where the Related clause CI links Duplicate CI where there is at least 1. As Brent said, you could create dashboard widgets to display any duplicates, or even create a business process to alert when one is created.
That's because I got the idea from you a while ago and it was good dear Sir!
I have been trying to figure out how to make the relationship constraints dynamic.So I could use the same but choose which duplication im looking for with a filter perhaps.
Duplicate hostnameDuplicate user
Could you elaborate a little more on this setup. I have a need for this and am stumped on the setup.
I create a CI links Duplicate CI relationship but for my widget I either get a count equal to my total CMDB or 0.
I'm missing something here either in the relationship or the widget or both. I've got this at the top level Configuration Item.
DISREGARD: I kept chugging and found my issue was with the search I setup. Needed to do a Related Clause. BINGO!
Sorry, but is it possible to get the template of the search?
Hi there. I would also like to know what this relationship would look like. I'm trying to do a similar clean up and would like more detail about what these relationships look like. Thanks!