Skip to main content
Sumo Logic

Utilize Metrics Query Builder

Learn to use the metrics query builder, a structured and intuitive way to create metrics queries without having to know how the metrics query language works.

The metrics query builder provides an intuitive structured method for creating metrics queries without having to know how the metrics query language works. Instead, the metrics query builder allows you to select the building blocks for your metrics query from the dashboard user interface (UI).

For in-depth information on metrics and how to use them to your best advantage with Sumo Logic, see the Metrics documentation.

Creating a query with Metrics Query Builder

With the metric query builder, you can intuitively filter on a source by selecting it from a drop-down menu, then add a metric by choosing it from a list as well. Optionally, you can add one or more operators to the query, selecting each one from a drop-down list. You must first select a source filter or metric for the query before you can add an operator, however. In the following example, we create a metrics query that uses cluster and service sources, then calculates CPU usage (in seconds) for a container and applies rate and sum operators.

To create a metrics query to calculate the CPU for a host in a cluster, do the following:

  1. In the Sumo Logic UI, click + New and choose Metrics from the drop-down list.

Metrics_Query_menu-option.png

  1. On the Metrics page, click inside the From field and select a source on which to filter from the list. Optionally, you can begin typing to dynamically narrow the list, then select the source. You can add multiple sources on which to filter, as we have in our example.

MQB_From_select-filters.png

  1. Click inside the get metric field, and select the desired metric from the list. Optionally, you can begin typing to dynamically narrow the list from which to select the metric. 

MQB_get_metric.png

  1. Optionally, click the plus (+) icon and select an Operator from the list. You can apply multiple operators to a query, as we have in our example.

MQB_Operators-add.png

  1. Click Chart on the left for a chart display of the data. The default is Preview Table. 
  2. Optionally, you can change the chart display by clicking the downward arrow and then making a selection from the drop-down list.

MQB_Visualization_Type.png