Scheduled job "Update Query Based Services" remove records from svc_ci_assoc

RubenFuertes
Tera Guru

The scheduled job invoke the below code. This code is not visible for admins then we cannot see how works.

 

RubenFuertes_1-1720452042816.png

 

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:

RubenFuertes_12-1720454156581.png

SVC_CI_ASSOC: 6806 CIs associated

RubenFuertes_8-1720453680255.png

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:

RubenFuertes_11-1720454104856.png

SVC_CI_ASSOC: 5992 CIs associated

RubenFuertes_9-1720453919069.png

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:

RubenFuertes_13-1720454593900.png

SVC_CI_ASSOC: 5398 CIs associated

RubenFuertes_14-1720454664938.png

#CSDM #CMDB

0 REPLIES 0