Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

CMDB: Orphan CIs Correctness Score

Khill
Tera Contributor

I have created a orphan rule in CI Class Manager for computer class. The conditions are 

Khill_0-1760376227528.png

I ran the job for correctness. Total number of orphans changed, but some orphan CIs still have either upstream or downstream relationships or both. Can any one help me figure out how to remove and prevent CIs with relationships from being categorized as orphan? 

1 ACCEPTED SOLUTION

Cindy Trieu
ServiceNow Employee
ServiceNow Employee

Hi Khill,

 

Since you have an OR for the operator, we will calculate the orphans as such:

 

A CI is an orphan IF [Owned by is empty AND assigned to is empty] OR [they do not have any relationships with any other CI's]

 

If you want them to only be orphan if they don't have a relationship, I would recommend changing the operator to AND, otherwise, CI's with empty owner and empty assigned to will still be considered orphans even with a relationship.

View solution in original post

3 REPLIES 3

Mannapuram
Tera Guru

@Khill  This is already the case in your rule. Under Relationship section of your rule, you already specified 'Any Relation' and 'Any class', which means, the total rule is like 'Assigned to' is empty + 'Owned by' is empty + Not to have any relation with any class. 

Mannapuram_1-1760452495220.png

 

Even the documentation says the same. Here is the link and screen shot:

 

https://www.servicenow.com/docs/csh?topicname=t_CreateCMDBHealthOrphanRule.html&version=latest

 

Mannapuram_0-1760452427748.png

Check for one CI whether all these conditions are met. 

 

Cindy Trieu
ServiceNow Employee
ServiceNow Employee

Hi Khill,

 

Since you have an OR for the operator, we will calculate the orphans as such:

 

A CI is an orphan IF [Owned by is empty AND assigned to is empty] OR [they do not have any relationships with any other CI's]

 

If you want them to only be orphan if they don't have a relationship, I would recommend changing the operator to AND, otherwise, CI's with empty owner and empty assigned to will still be considered orphans even with a relationship.

Hi Cindy,

 

My CMDB Workspace says I have over a 50k CIs with missing relationships. I have an archive rule in place with conditions parent.sys_class_path is NULL or child.sys_class_path is NULL. 

 

When this runs none are the 50k CIs are being moved to archive. What is best method to correct this situation?