Automate and s the operational status of CI's as non-operational if 90 days over and no discovery

MohammadAmzad
Tera Contributor

Hi all can you please help me, how to set operational status of Cis as non-operational which are not updated via any Discovery source for 90 days 

1 ACCEPTED SOLUTION

JobyV
Giga Guru

You can easily achieve this through CMDB Data Manager policy, you need to create a Retirement Definition and add the Data Manager Policy with the same.

View solution in original post

8 REPLIES 8

YaswanthKurre
Giga Guru

Hi @MohammadAmzad ,

 

Flow Designer Approach (No-Code/Low-Code)

Steps:

  1. Create a New Flow

    • Go to Flow Designer > New
    • Name: whatever you want
  2. Trigger

    • Use Scheduled Trigger
    • Run: Daily or Weekly
  3. Add Action: Lookup Records

    • Table: cmdb_ci (or specific CI class like cmdb_ci_server)
    • Conditions:
      • sys_updated_on on or before 90 days ago
      • discovery_source is empty (or not in known discovery sources)
  4. Add Action: For Each

    • Loop through the records found
  5. Inside Loop: Update Record

    • Set operational_status to 2 (Non-Operational)
  6. Save and Activate the Flow.

or you can do scheduled script in the same process.

 

Please mark this as helpful and correct if this helps.

 

Thanks,

Yaswanth

 

 

thank you @YaswanthKurre , let me try this one, will update you 

JobyV
Giga Guru

You can easily achieve this through CMDB Data Manager policy, you need to create a Retirement Definition and add the Data Manager Policy with the same.

Hi @JobyV here are the OOB retirement custom definitions we have but they are active false, can you please let me know which one i need to make active true

MohammadAmzad_0-1750871136293.png