Building a query

Working with local/custom queries. The queries created by Content Creators are local/custom queries and are marked with the operator icon. Content Creators can create, load, run, hide, delete, and reload local queries in their operator sites.

Creating or editing a query

A Content Creator can create a new query in the following ways:
  • Build Relevance expression through the Build relevance tab and save it as a query.
  • Find an existing Relevance expression through the Find relevance tab to use it in the query editor in the Untitled tab
  • Enter Relevance expression in the Query editor and save it.
  • Create a copy of an existing query, edit it as needed, and save it with a different name or save it to a different site.
To create or edit a query:
  1. In the Untitled tab ensure you are in Edit View.
  2. Enter the Relevance expression in the Query editor.
    1. To edit an existing query, select the desired query under a category. This displays the title of the query and Relevance expression in the editor which you can edit. You can also click Clear Query to enter your Relevance expression afresh.
    2. You can build Relevance expression from the Build relevance tab or find an existing Relevance expression from the Find relevance tab and copy and paste it in the Query editor.
  3. Add parameters to the Relevance expression, if required. For details about parameters, see Managing parameters in queries
  4. Click Save.
    Image of Save Query dialog.

    1. Enter a descriptive title for the query.
      Note: It is recommended to keep the query title short up to a maximum of 23 characters. If the query title is longer than that, the title is truncated on the title tab.
    2. Select a site that you are allowed to access and host the query on.
    3. Specify at least one category for the query.
      • If you specify more than one category, the query appears in all the specified categories.
      • If you enter a new name in the Categories field, a new category is created.
    4. Click Save.
  • Writing Relevance expression in the query editor is similar to writing Fixlets in the BigFix Console using the Relevance language. It is recommended to be familiar with the Relevance language to build queries. To learn more about the Relevance language, see BigFix Developer. However, you can build Relevance expressions with limited knowledge of Relevance language through Build relevance tab using proper filters.
  • Concise queries that are limited in scope run most efficiently. Broad, general queries that return large data sets consume more resources and impact the performance. Problems associated with poorly performing Relevance in the Console can also occur in the Query editor.

Create copy of an existing query

A query is uniquely identified by its title and the site on which it is saved. To create a copy of a query, change either the title or the site of the query.

Note: If multiple content creators save a copy of a query with the same name and category in different sites, Master Operators might see multiple instances of the same query under a category.

To see who last edited a query, hover the cursor over the operator icon of the query.

Deleting a query

To delete a query, select the query and click the Delete Query icon next to it.
  • Operators cannot delete queries.
  • Master operators/Content Creators can delete the custom queries only and not the system queries.

Using Client Context

As a content creator, you can enable the Evaluation by Agent flag to save a specific query and use the client context. Enabling the Evaluation by Agent flag and running a query helps you to retrieve accurate data from the client.

By default, the Queries are evaluated by Client Debugger. You can change it by using the _WebUIAppEnv_USE_CLIENT_CONTEXT client setting. If this setting is set to 1, the Evaluate by Agent flag is enabled. The value for each query can be overwritten only by the content creator. You can save the individual query by enabling the Evaluation by Agent flag, which allows an operator to use the client context.

Note: Evaluation by Agent flag is available only in BigFix Platform version 9.5.13 and later.