CMDB Lifecycle Policy Issue

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2024 08:30 AM
I have created a CI lifecycle policy that pulls CIs that have not been discovered in the last week.
MY filter= Most recent discovery Before DateXXX
Then there is the enforced conditions of = Sys class path is a /!!% AND Life Cycle Stage != End of Life .or. Life Cycle Stage is empty .or. Life Cycle Stage Status != Retired .or. Life Cycle Stage Status is empty
In the last two days, I am receiving CIs, classed "Exit Interface Routing Rule". They comply with mine and the enforced conditions filter, however, they are coming through with up to date "Most recent discovery" date. Today is 12/3. I have two in the policy for 12/2 and now 5 from today.
I cannot figure out how these are getting through! Any ideas? screen shot provide of policy filters and the last report.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 08:39 AM - edited 02-11-2025 08:58 AM
I'm having the same issue. I have a theory that it's related to retirement definitions, like it might be adding conditions from the retirement definition based on the table it's configured for, and which matches the table (class) you have set in your retirement policy.
In my PDI I'm able to see a message related to "Enforced Conditions": "Enforced conditions are applied implicitly for certain policy types like delete and archive to filter CIs based on custom retirement definitions. Go to 'Settings' to view and manage these conditions.
I originally wanted to use as few retirement definitions as possible, so tried to limit it to what's out of the box: cmdb_ci, cmdb_ci_hardware, cmdb_ci_app, etc. The idea would be I could use the cmdb_ci_hardware retirement definition for any retirement policy I wanted for classes under Hardware -- I could set the table to Hardware, and in the filter conditions narrow it to more specific classes.
So for example, when trying to set up a retirement policy for the Printer class, I set the filter to use Table = cmdb_ci_hardware so I could use that retirement definition, thinking that adding a condition of Class = Printer would narrow the filter to just printers but use the retirement definition for cmdb_ci_hardware.
Unfortunately, when I applied the filter, it included other things in the Hardware class. But when I changed the retirement policy to use Table = Printer, it uses a retirement definition for cmdb_ci_printer, and the included records only show printer CIs as expected.
So it looks like if you want to be pretty granular with how CIs from various classes are retired, you might to need a lot of retirement definitions, since it looks like they apply to all the child/subclasses of whatever class is specified in the definition. If you want to limit how many retirement definitions you need, you'll also need a limited number of retirement policies and paint in broad strokes.
Edit: After some further experimentation, it looks like if you create a retirement policy where the Table = Configuration Item (which would use retirement definition for cmdb_ci), it might actually only apply the filter conditions on the policy as expected, without adding any extra "enforced conditions" from the retirement definition.