Stale CIs

NicoleHollihan
Tera Contributor

Hello,

 

I am getting CIs in my Stale CIs report that are not stale. Some are still being discovered, some are retired due to business rule, therefor shouldnt be stale as those also were just decommissioned a few weeks ago. I set a health inclusion rule to not pull any Install Status CIs that are retired, but it still is. Is there a rule somewhere else that I need to set that is over riding my health inclusion rule. I am only noticing this on VM's on vCenter. 

 

Thank you

Nikki

1 REPLY 1

Shubham_Jain
Mega Sage

@NicoleHollihan 

 

Step 1: Use Scripted Inclusion Rule

  1. Go to CMDB Health > Configuration > Health Inclusion Rules.

  2. Click New → Choose Staleness as type.

  3. For Class: cmdb_ci_vmware_instance

  4. Set Active = true

  5. Use this Script:

(function executeRule(ci) {
   return ci.install_status != 7; // Exclude Retired VMs
})(current);

 

Step 2: Link Rule to Staleness Schedule

  1. Go to CMDB Health > Staleness > Schedules

  2. Find the schedule for cmdb_ci_vmware_instance or parent class.

  3. Edit it → Set Inclusion Rule to the one you created.

  4. Save and run the schedule.

 

See if this works for you. 

 

 

✔️ If this solves your issue, please mark it as Correct.


✔️ If you found it helpful, please mark it as Helpful.



Shubham Jain