Using the visual query builder

The visual query builder provides an intuitive way to create complex queries without needing to use the query language. To get the most from the visual query builder, you should have some understanding of the BMC Discovery model. 

To create an example query by using the visual query builder

The following procedure walks you through the basic usage of the visual query builder:

  1. To access the visual query builder, from the main menu, select Explore > Query.
    The Query page is displayed, showing the last tab that you were using. If it is not showing, select the Visual Query tab to see the visual query builder. The starting view of the visual query builder is a screen containing an Add a starting node kind icon. 


  2. Click Add a starting node kind icon. The Node Kinds selection panel is displayed.


    • The default panel is the Common node kinds list.
    • You can also select a list of nodes By category or you can search the kinds displayed by using the Search box.
    • You can also choose a 'wildcard' node that matches any node kind.
  1. Choose a node kind to add. For example, select Host node by clicking Host in the common node kind list.



    • Click the Filters and Columns button to modify the filters applied to the Host; for example, OS Type, and so on, or the columns displayed in the table showing the query results. You can also modify the Filters and Columns by using the controls around the selected node.
    • Click Apply each time you make a change to the panel. Doing so saves the change and closes the panel. 
  2. Each node has controls around its edge. They are as follows:


  3. Click Add a related node, and choose a node kind to add. For example, select Software Instance node by clicking Software Instance in the common node kind list.


    • When you add a related node, a relationship between the two nodes is added.
    • Relationships have a type, and required counts of the node kinds at each end of the relationship. For example, you might be searching for a host with two Software Instances of the same type, or a host with zero patches with a particular serial number.
    • Click Edit relationship.
  4. The Relationship picker panel is displayed.


  5. If the required count of either node is not one, select the count required to match the query.
  6. Select the type of relationship to link the nodes. The relationship drop-down is populated with the most appropriate relationship types. For example, between a Host and Software Instance node, the options provided are:
    • Any Relationship If a Host node is related to a Software Instance node by any relationship, then it will match.
    • Software Instances running on this Host If a Host node is related to a Software Instance node, then it will match.
    • Aggregate Software Instances hosted by this Host If a Host node is related to an Aggregate Software Instance node, then it will match.
  7. Click Apply each time you make a change to the panel. Doing so saves the change. 
  8. To run the query you have just constructed, click Run Query.
    The following query searches for Windows hosts with one or more Business Services, and creates a list showing the Host and Business Service details. Focus is currently on the Host node, so the query is run starting from the Host. The results show the columns specified on the Host, for the Host and the Business Service.


    These are the results of running the query with the focus on the Host node:


    When you have run the query, it is added to the list of saved queries:


    These are the results of running the query with the focus on the BusinessService node:
     

    This query is also added to the list of saved queries:

Was this page helpful? Yes No Submitting... Thank you

Comments