Scheduled job "Update Query Based Services" remove records from svc_ci_assoc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2024 11:53 PM - edited 07-09-2024 01:02 AM
The scheduled job invoke the below code. This code is not visible for admins then we cannot see how works.
In our instance we have several technical service offerings related to Dynamic CI groups and these have cmdb groups. Our intention is to synchronise the value of the offering groups to the CIs groups ( we are interested in managed by group in this case ). So far so good.
In some cases as we add queries to "CMDB Group Contains Encoded Queries" (cmdb_group_contains_encoded_query) when the previous scheduled job is executed it deletes records that were previously well associated in svc_ci_assoc.
As you can see in the first example, Servicenow is retrieving 6806 CIs and those CIs have been correctly associated with your Dynamic CI Group.
CMDB Group:
SVC_CI_ASSOC: 6806 CIs associated
So far it seems to be working correctly, the CIs returning the different queries are being associated with the dynamic ci group. The problem comes when we add new queries for the cmdb_ci_datacenter class (the query does not return CIs in this case ) but in the svc_ci_assoc table it deletes some associates that had been generated.
CMDB GROUP:
SVC_CI_ASSOC: 5992 CIs associated
Can anyone help us to know why Servicenow considers in some cases that it has to delete the associations?
Another example. We delete the Datacenter query and we have the 6086 CIs correctly associated again. We create a query for cmdb_ci_appl and the result is surprising. It associates the cmdb_ci_appl and subclasses and deletes a lot of associations between servers and dynamic ci groups.
CMDB GROUP:
SVC_CI_ASSOC: 5398 CIs associated
#CSDM #CMDB