Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.

Build a CMDB query using the CMDB Query Builder

Log in to subscribe to topics and get notified when content changes.

Build a CMDB query using the CMDB Query Builder

Build a CMDB query in the CMDB Query Builder.

Before you begin

The UI16 plugin (com.glide.ui.ui16) must be activated.

Role required: cmdb_query_builder (contained for itil and asset)

About this task

Build the query by dragging the CI classes that you want to include in the query, dropping them as nodes on the canvas, and then defining relationship properties between them. For every class node in the query, you can filter on its attributes to narrow down the results to a specific set of CIs of that class or to a single specific CI. You can also select the property columns that display in the query results. Query filters use related list conditions which allow the inclusion of a relationship with another table in the filter. For more information, see Add related list conditions.

Authorized users can update and delete a query created by another user.


  1. Navigate to Configuration and click CMDB Query Builder.
  2. On the CMDB Query Builder page you can:
    1. Click Create new. Type in a Name, choose CMDB Query as the Query type, and click Create.
    2. Click a widget of a saved query to continue building an existing query. Search saved queries first if needed.
    3. Point to the upper right corner of a saved query widget, and click the Duplicate Query icon to edit a copy of a saved query. The new query's default name contains the string 'copy'.
  3. On the canvas, you can:
    • Add CI classes to the query: Select classes from the class hierarchy under CMDB Artifacts and drag them to the canvas.
    • Add connections between two nodes on the canvas:
      1. On the first node in the relationship, click the small square at the center of the right side to toggle its color to blue.
      2. On the second node in the relationship, click the small square at the center of the left side to toggle its color to blue.
      3. In the Connection Properties dialog box:
        • Choose the parent/child roles in the relationship and then configure the properties in the respective section of the connection properties.
        • Click Add Relations and select a relationship from the list of existing relationships between the CIs (including descendant classes).
        • Select No Relations to query for classes that do not have any relationships with each other. For example, query for all Tomcat WAR CIs which are not connected to a Windows Server.
        • Click Add Reference to choose a field that the parent class (including ascendant parent classes) uses to reference the child.
      4. Click Confirm.
      Table 1. Relationship UI Notations
      Notation Description
      Full line A relationship in a CMDB query.
      Dotted line A relationship in a Service Mapping query.
      Red asterisk at the center of the connection line Information such as relationship type is missing, invalidating the query.
    • Add filters to the query:

      The initial elements of a query are classes. Applying filters, you can narrow a class down to a specific set of CIs or to a single specific CI.

      1. Point to the node to add a filter to.
      2. Click the Apply Filters icon that pops up above the node.
      3. Add attribute and related list conditions.
      4. Close the Filters section on the canvas.

      For example, add a filter for database location to query for databases located in Seattle.

      Click Applied Filters in the navigation bar on the right to view all filters that were added for each node on the canvas. When you select a set of filters in the navigation bar, the respective node that these filters apply to, is highlighted. And, if you select a node, the respective set of filters that apply to that node, is highlighted.

    • Add AND/OR operations to the query:
      1. Connect one node to two other nodes.
      2. Click the AND box that appears to toggle between the And and the Or operations.

      For example, C1 is Tomcat WAR, C2 is Linux Server, and C3 is Windows Server. Query for all Tomcat WAR CIs which are connected either to Linux Server Or to a Windows Server.

    • Add property columns to display in the query results:
      Note: For a relationship, the query results display the parent, child, and type columns. You cannot add any other columns from the [cmdb_rel_ci] table.
      1. Click the node to add properties to.
      2. Click the Properties tab, and then click Add Columns.
      3. Select the properties to display and then click outside the properties list to close it.
    • Select columns and add filters that will be applied to the resulting set of services:
      1. Ensure that Properties is selected at the top on the right-hand side navigation bar, and then click an empty space on the canvas to ensure that nothing is selected.
      2. Click Add Columns at the bottom of the right-hand side navigation bar and select columns to add.
    • Create a combination query by integrating a Service Mapping query into a CMDB query:
      1. Click Saved Service Queries.
      2. Select a Service Mapping query and drag it to the canvas.

      This query returns all CIs that satisfy the CMDB query, and that are included in the services returned by the Service Mapping query.

    • Add a search tag that can then be used as a search criteria for saved queries:
      1. Click the Add Tags icon.
      2. Click Add Tag, and enter the tag string.
      3. Click the Add Tags icon again to close the Query Tags dialog box.
  4. Modify the query:
    • Apply filters: Click a node and then click the Apply filters icon to add or edit the node's filters.
    • Modify relationship properties: Click the line that represents the relationship between two nodes to display the Connection Properties on the right-hand side pane.
    • Modify Query Builder settings: Click the (Settings) icon to open the Query Builder Settings dialog box.

What to do next

  • Click Save.

    In the Saved Queries tab, you can point to a saved query widget and click the 'i' icon to view query information such as the query type, last update date, CMDB groups associated with the query, and the query schedules.

  • Click Run.
    Note: When a query is running, wait for it to complete or to time out before opening or running another query.

    The query results pane displays only the first 100 results of the query.

    • Click Load More Results to display the next set of 100 results.
    • Click Load All Results to display the rest of the query results, up to the number specified by the glide.cmdb.query.max_results_limit system property (10,000 by default).
  • Create a report from CMDB query results.
  • Create a schedule to run the query at a future time, and to email the results to interested parties.
  • Click the Query Results context menu and select Export. Even if the Load More Results button is visible, indicating that there are additional query results, only the results that are visible are exported.

  • Populate a CMDB group using the saved query.