Remove Retired Related items from Business Applications

jackinsidend
Giga Guru

We have many items in our cmdb_rel_ci table, that relate servers to their services.

These show nicely in a business application, you can see all the servers that make up that application.

However, if we retire a server, it still shows there. I can delete that record from the table, but wondered if there is a way to configure it to not show non operational servers.

Thanks,

Jack

1 ACCEPTED SOLUTION

jackinsidend
Giga Guru

I created a flow that runs daily, the queries for decommed servers in the relationship table, updates the comment field on the server record with the old relationship and then deleted the record.

Seems like a decent solution for now.

Thanks,
Jack

View solution in original post

5 REPLIES 5

Brian Lancaster
Tera Sage

I'm not sure you can.  I think you best option would be to create a business rule on the cmdb_ci table that fires when a CI is set to retired and then delete references to in the cmdb_rel_ci.

Krishna  Penaka
Tera Expert

Hi,

You can add/remove CMDB relationships by using this table "cmdb_rel_ci". Your idea about change the status and then remove the CI relationship is good. Just consider other impacted areas like Business Services and Service Mapping. You can use Business Rules to accomplish your solution.

Sushant Kadam1
Kilo Guru

Hi,

Best way to handle inactivation of CI's is to use the Status (install_status) field. The default value of "Installed" means that the CI is active. The choice of "Retired" is used as inactive and it will not be discovered in next Discovery Schedule!!

Note: You would need the CI's for audit purposes later-on. So never delete CI's. If it goes too large you can run a archive rule on it.

 

Regards,

Sushant Kadam

jackinsidend
Giga Guru

Yes, it is not my intention to delete the CI's. More interested in what the best practice is for the cmdb_rel_ci table.

We are not using discovery, so this is a manual process right now.

Setting the install status to '7' which is retired, seems to have no impact on the cmdb_rel_ci table or the realted items under my business application.

 

So the conclusion is, the only thing we can do, is delete the record from the cmdb_rel_ci table to clean up the related items elsewhere in ServiceNow..

 

Thanks