Exclude CI's from Health Metrics

lucr
Kilo Expert

Hi,

We want to use the new CMDB Health dashboards for managing our CMDB. However within our company we do not delete CI's but give them a status of "Removed". Of course these CI's become stale over time or don't have the appropriate relations.

So my question is How can we exclude these CI's from the Health Collection Jobs.

I've looked and searched but cannot find it. First I thought the conditional field on the job could help us but that field only determines when the job is run not on which CI's.

Also tried to find the script include that handles the logic but i cannot find it.

Any help would be appreciated.

Kind Regards,

Luc

1 ACCEPTED SOLUTION

Hi Catherine,



We did not find a OOB solution to filter out certain CI's. Even got ServiceNow PS involved in the question but till this day no actual solution.



Did experiment with some business rules. The following one does its work. But does not cleanup after the CI is changed. So also create a business rule on the cmdb_ci that removes all cmdb_health_result after a certain condition is changed. This one is async rule.



Created a business rule on:


cmdb_health_result


Before business rule that will check for a certain condition on the CI reference field (dot-walked) and if true aborted the action so no insert.



I know it is not the nicest of solutions..



Greets,


Luc


View solution in original post

7 REPLIES 7

Hi Luc,



Thank you for sharing your solution. I will see if I can make something work in our instance that is similar!



Catherine


Using the two business rules worked like a charm. You can also set a property for CMDB Health with an encoded query to define what needs to be excluded. Then use this property when performing the queries in the business rules. This way the cmdb manager can edit what constitutes old/retired CIs without a developer having to change the code.


Hadyn
Tera Expert

Looks like they addressed your issue in Jakarta. There is now something called health inclusion rules.



I am not sure exactly how they are evaluated and the docs don't say, but I assume if no rule is set then it will be included and I also assume it would first check the actual ci class for rules and then it's parent class and so forth.



So I guess you could specify an inclusion rule that applies to the on cmdb_ci table with a query of status != Removed.



However I would be surprised if there is not another mechanism to exclude ci's based on state because all ci's go through a lifecycle.



More info here CMDB CI Lifecycle Management


and here When Configuration Items Go Stale