ServiceNow CMDB Query Builder Complete Guide and Use Cases
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
ServiceNow CMDB Query Builder Complete Guide and Use Cases
Why CMDB Query Builder Is Important
CMDB data becomes valuable only when you can
- Analyze relationships between Configuration Items
- Identify gaps risks and compliance issues
- Support strategic decisions using accurate infrastructure insights
CMDB Query Builder helps by providing
- A drag and drop visual canvas
- Relationship based querying
- Reusable and exportable queries
- Integration with reporting and scheduling
Sample Customer Use Cases
Customers commonly use CMDB Query Builder to
- Find servers connected to a database or load balancer
- Identify data centers not connected to any configuration items
- Locate servers running applications on unsupported software versions
- Query load balancers that do not support a specific service
- Determine the number of deployed virtual instances per data center
- Find servers without a managed by group assigned
CMDB Query Builder Interface
The CMDB Query Builder provides a visual canvas where users can
- Drag CMDB classes onto the canvas
- Define filters on each class
- Connect classes using relationships
- Control relationship depth and direction
Key interface areas include
- CMDB Classes Panel used to browse and search CI classes
- Canvas used to visually build the query
- Filters Panel used to apply conditions
- Properties Panel used to select output columns
- Query Results Pane used to view results
Query Types in CMDB Query Builder
CMDB Query Builder supports three query types
CMDB Query
- Queries infrastructure CI classes and their relationships
- Supports CI to CI relationships
- Can include non CMDB tables
Example
Find all Windows Servers connected to a SQL Server database
Service Mapping Query
- Queries application services using service maps
- Uses patterns defined in Service Mapping
- Works within application service maps
Example
Find all application services utilizing a Linux Server
Combination Query
- Combines CMDB Query and Service Mapping Query
- Enables infrastructure to service correlation
Example
Find Windows Servers connected to a Tomcat WAR and include related application services
Example Windows Servers and Applications
A common scenario is querying Windows Servers running older operating systems and connected to applications
- The starting node is Windows Server
- Filters are applied on the operating system field
- The server is connected to the application CI class using relationships
- Results show server details with related applications
This helps identify legacy infrastructure risks
Using Query Results
After running a query the results can be
- Viewed in a table format
- Filtered and sorted
- Used to populate CMDB Groups
CMDB Groups
Saved queries can dynamically populate CMDB Groups allowing teams to
- Apply bulk actions
- Monitor CI populations
- Support governance and compliance activities
Exporting Reports from Query Results
CMDB Query Builder allows exporting query results into multiple formats
Steps to export
- Run the query
- Open the query results list menu
- Select export
- Choose the required format
Supported formats
- PDF
- Excel
- CSV
Scheduling CMDB Queries
CMDB Query Builder supports scheduled execution of queries
Scheduling features include
- Running queries on a schedule
- Sending results by email
- Attaching result files
- Compressing attachments if required
Example use case
Weekly report of servers without a managed by group
Import and Export Queries
CMDB Query Builder queries can be migrated between instances
Export a query
- Open CMDB Query Builder
- Open the saved query
- Select export query
- Download the XML file
Import a query
- Open CMDB Query Builder
- Open saved queries
- Select import query
- Upload the XML file
CMDB Query Builder System Properties
Query Builder behavior is controlled using system properties
Access methods
- Open CMDB Properties and Query Builder Properties
- Or open sys properties. list and search for query builder
Common controls
- Enable or disable features
- Control relationship depth
- Adjust performance settings
