- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2023 03:37 AM
Hi,
I am trying to use the CMDB Query builder to create a dynamic query that can be used in a Technical Service Offering.
The logic includes 2 CI classes; Server and MSFT SQL Instance. I am trying to create Technical service offerings for the the different environments and apply to the DB Instance. eg SQL Prod, SQL Test, SQL Dev. These can then have different criticality, support team, etc...
The logic relies on the environment of the server. If the server has a production environment then so will the database instance that runs on that server...
I have created the query however the results cannot be configured to exclude the servers and so cannot be used in in a dynamic CI group. The servers are part of another service offering and are supported by windows platform teams so I dont want to include them. I only want the instances.
The server is required for the logic to work in the query but should not be in the output, I only want the DB instances.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2023 07:16 AM
This is just how the Dynamic CI Groups/CMDB Groups work. They take ALL of the CIs returned in the Saved Query. For CMDB Groups created with standard filters (which is a common use case) you look for a specific set of CIs of a specified class that meet certain conditions. However, if you use a Saved Query to populate your CMDB Group, then it will include all of the CIs that are in that query.
The opinions expressed here are the opinions of the author, and are not endorsed by ServiceNow or any other employer, company, or entity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2023 06:55 AM
you should be able to use the exact string i put in my original post:
msft sql instance that runs on server whose environment is PRD
the only things you may need to change are:
- "environment": use the field name from the server CI records that you use to check whether they are production systemsor not.
- "PRD": use the field contents that you use, to determine whether a server is a production system or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2023 02:42 AM - edited ‎04-14-2023 02:45 AM
The MSFT SQL Instance class should be the starting node in your CMDB Query Builder.
The starting node resulted CIs will be the targeted CIs for Dynamic CI Group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2023 06:03 AM
Hi, Thanks for your response.
It doesn't matter which which is the starting node, when you link the query to a dynamic ci group and select the "view group cmdb cis" it gives me both servers and instances.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2023 07:55 AM - edited ‎04-14-2023 08:27 AM
Hi,
Did you tried the solution what I've given. If not, please make a note on below points.
1. Make DB Instance class as starting node and connect with Server class by applying your filters
2. When you run the CMDB query, results will be displayed for both DB instances and servers.
3. But when you called that CMDB query into the CMDB group and Dynamic CI Group, starting node CIs will be picked and associate to the Dynamic CI Group.
Please note there is an OOB scheduled job runs for every 10min to associate the CIs
I'm confident you can achieve with this, try once.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2023 07:36 AM
Hi Srinivas,
Thanks for your response. I have tested this and both the server and the db instance is updated by the CSDM data sync. The Change/Manged by/Supported by groups are propagated down onto all members of the dynamic group, not just the starting node CIs. Point 3 above is incorrect.