If parent CI is retired, then child CI CI needs to be retired

Hanumant Madan1
Kilo Guru

Hello All,

I have below requirements:

When a discovered CI is Retired all components that were discovered on the CI should automatically be retired with the CI is Retired.

Any way to develop something that will look at all CIs and if parent CI is anything other than Install Status "Installed" then the child CIs are updated to Retired or to match the status of the parent CI.

Any help will be appreciated.

 

Regards,

Hanumant

12 REPLIES 12

Rahul Priyadars
Giga Sage
Giga Sage

if Child CI is not shared with other parents then you can retire it.

I will go for a scheduled Job for this to retire all Child of a given Parent CI and remove corresponding relationships also from CMDB_REL_CI Table.

https://community.servicenow.com/community?id=community_question&sys_id=383fa25f1bb56010ed6c9979b04bcb0c

Regards

RP

Hi Rahul,

 

not sure how we check if child is related to multiple parents, but can you exaplin in what case it is good to have relations also removed.

 

Our current ask is to change status of child CIs.

 

Regards,

Hanumant

not sure how we check if child is related to multiple parents---> this comes in case of shared CI. I give u an example

find_real_file.png

Now u can see Host1 hosts 2 applications. You need to write script to check same from Relationships table.

Regards

RP

why would you recommendremoving CI relationships also from CMDB?

is it something to do with performance?

 

Regards,

Hanumant

It is something to do with unnecessary records when CI is retired then remove its links with all retired CIs.

Regards

RP