Report on CIs marked retired last week

sbhayani
Tera Contributor

Hello Experts,

I have a requirement, where i need to take out report of CIs that marked retired in past 7 days. 

i am stuck between cmdb_ci_computer and sys_audit table. i need only CIs that was marked retired.

Any help is highly appreciated.

3 REPLIES 3

dvp
Mega Sage
Mega Sage

CI do not capture the Retired date. If the synchronization between CI and Asset is enabled in your system, you can dot walk to Retired field on Asset and use it as a filter

Jeff Currier
ServiceNow Employee
ServiceNow Employee

Not many people can read sys_audit and that is more helpful for changes.  Wouldn't it be best to just look at the retired date on cmdb_ci_computer using the dot walk to asset?  Or you could just look at the asset table directly, but then they may not also be CIs.  Here is an example, but you can also add state= retired if you want.

find_real_file.png

sbhayani
Tera Contributor

Somehow the retired date is not in synch with Hardware status field in CI. however, your response gave me idea to do some hack.

I created a date time field which will be updated with business rule whenever the CI is marked retired.