Default language.

Important This documentation space contains information about the on-premises version of BMC Helix Discovery. If you are using the SaaS version of BMC Helix Discovery, see BMC Helix Discovery (SaaS).

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. 
    VQB-start.png


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


    • 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.
    VQB-add-host.png



    • 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:
    VQB-node-controls.png

  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.
    VQB-relationship.png

    • 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.
    VQB-relationship-picker.png

  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. To apply a filter to the relationship, click Filter
    The Relationship picker panel is displayed showing the filter selector.
    VQB-relationship-filter.png
  8.  Add a filter to the relationship if required, in the same way as described in Filters. In practice, it is rare to need to filter relationships.
    If you apply a filter to a relationship, the icon in the center of the relationship changes to a filter symbol, and hovering over the icon provides additional details:
    VQB-with-rel-filter.icon.pngVQB-with-rel-filter.hover.png
  9. Click Apply each time you make a change to the panel. Doing so saves the change. 
  10. 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.
      VQB-run-query.png

      These are the results of running the query with the focus on the Host node:
      VQB-query-results.png

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

      These are the results of running the query with the focus on the BusinessService node:
      VQB-query-result-BServ.png

      This query is also added to the list of saved queries:
      VQB-query-saved-BServ.png

    • The following query contains a parameter, for information on how to add parameters, see to define a parameter:
      QueryParam.png

      The parameter requires you to enter, in this case, the Operating system type when you run the query. For example, Linux. The query searches for Linux hosts running Apache. Entering Windows would use the same query to search for Windows hosts running Apache:
      QueryParamLinux.png

      Queries with parameters are also added to the list of saved queries, they have '<parameter>' in the name, showing that the query contains a parameter, and its position in the query:
      SavedParamQuery.png

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*