Remove CI Relationships

jeremyeperdue
Giga Expert

My goal is to be able to "retire or decommission" a CI. Using the Server Class, I will use a Windows Server as an example.

In our environment, we can retire a server running Windows, then bring it back online as a Linux machine. For reporting purposes and requirements by our CMDB team, we will need to keep the old CI record and the new CI discovered record. The current server will be active with all details and the previous server is set to inactive and numerous fields are cleared.

I have the code for removing all fields and linking the old CI to the new CI, but I am looking for assistance with the removing relationships part. What is the best way to purge the relationships on a CI?

Example: The retired Windows server was running an instance of MSSQL. This machine is clearly no longer running the database. So while we want to keep the records about the software that was installed, disk drives, serial numbers etc... , I want to remove the relationship(s) that would only be accurate if the machine is still "active". What is the best way to handle this?

16 REPLIES 16

So you are not using this for services? How are you handling when equipment is decommissioned. I might have overlooked something, but do those relationships get removed once say a server is retired? 

Hi all, 

I am trying to utilize the Cascade-retire dependent CIs  out of box feature for below need:

If a server is retired , all dependent ci to be retired. example: Application abc runs on a Windows Server xyz  When xyz is retired, abc would  become orphan dependent CIs. So it has set application  abc to retired.

 

Business rule After BR: Track “Retired” CIs runs to
check if the CI belongs to a class which has any downstream dependencies.

 

I have also created custom lifecycle definition with condition like for server class the operational status is non operational. And also updated the BR "Track Retired CI" to trigger when operational status changes to retired.

 

The CI is added to the CMDB CI End Of Life Ledger [cmdb_ci_end_of_life_ledger] table.

then I can see all dependent ci being listed in ch CI in the CMDB CI End Of Life Ledger [cmdb_ci_end_of_life_ledger] table.

 

Till this point it works and In data manager I have the conditions and the can seee the matching criteria too.

Also ran the scheduled job CMDB Cascade Retire Dependent CIs 
If there is a dependent relationship with a dependent CI, then that dependent CI is added to the CMDB Dependent CI Ledger [cmdb_dependent_ci_ledger] table
with the Retire action.Also ran the  Scheduled Job CMDB Dependent CI Policy Processor runs  to process the CIs in
the CMDB Dependent CI Ledger [cmdb_dependent_ci_ledger] table.

 

After the  approval is provided the task will be closed complete. But I see the dependent Ci listed in ledger table still as operational.

 

Can someone help me to understand this process? Is there a recommended way to approach  this, Any guidance would be greatly appreciated!

Thank you.