How to avoid Virtual Machine Instance CIs being part of a DCG when using tags

Johannes
Kilo Sage

Hi,

We have a lot of servers we need to add dynamically to a Dynamic CI Group, so they can be added automatically to a change request when e.g. patching the servers. (This is ootb funtionallity.) 

The servers are in Azure and are tagged there, so the best way for us to add the servers to the DCG, is to create a query based on the tags, and add the query to the CMDB Group being used by the DCG.

In the CMDB, the servers CIs are in one table, which are related to the Virtual Machine Instance CIs, which in turn are associated with the tags in the key_value table.

If I create a query with the CMDB Query Builder, the result will list Server CIs and the Virtual Machine Instance CIs, and when I add this to the DCG, the DCG will consist of both classes. Further, when using the DCG in a change request, both Server CIs and Virtual Machine Instance CIs will be added. This is confusing for the users.

How can we dynamically add the server CIs to the DCG without also adding the vm instance CIs?

(Of course, I can create a business rule creating records in the key_value table for the Server CIs based on the Virtual Machine Instance CIs, or add a custom attribute on the Server CI table and add the tags directly on it, but I would expect this to be a common use case, so it should be possible to do without customization.)

1 ACCEPTED SOLUTION

Looks like I have probably misunderstood the functionality. I see that if I press "View CMDB Group CIs", both server CIs and VM CIs are being shown, but if I press "View Service CIs", only server CIs are shown, and if I select the DCG  as Configuration Item in a change request, only the server CIs are added to the "Affected CIs" tab.

So, case solved:)

View solution in original post

4 REPLIES 4

Ram Devanathan1
ServiceNow Employee
ServiceNow Employee

You could copy over all tags from the VM instance CI to the server CI and build the CI group with only server CIs. won't that work?

Yes, I could, but we are constantly building new servers in the cloud, so that would have to be an automatic job keeping those updated.

Michael de Boer
Giga Guru

Can you share a screenshot of your query?
What is the CI Class that you use to retrieve the CI's?

Regards,

Michael

Regards,
Michael

Please mark the suggestion as helpful/like, if you find it useful to you or others who wants to refer similar content.
Please mark the solution as correct, if the answer provided has resolved your query.

Looks like I have probably misunderstood the functionality. I see that if I press "View CMDB Group CIs", both server CIs and VM CIs are being shown, but if I press "View Service CIs", only server CIs are shown, and if I select the DCG  as Configuration Item in a change request, only the server CIs are added to the "Affected CIs" tab.

So, case solved:)