Metrics queries

You can use multiple queries in the Kloudfuse Metrics interfaces.

When you specify the first filter, you define the first query. Kloudfuse identifies it as query a (a) in the interface. You can add additional queries, b (b) and others, to your analysis.

Add query

  1. To add a query, click Add Query button (Add Query).

    metrics explorer query add
  2. Notice that a new query B (B) appears under query A (A), and it is a duplicate.

    This is intentional, and makes it is easier to perform calculations across the time series retrieved by the two queries.

    metrics explorer query two
  3. Change the selected filter in query B (B).

    Here, change the metric aws_logs_call_count to aws_logs_error_count.

  4. The interface displays the result of two queries, the logs call count and the corresponding error count.

    metrics explorer query two result

Separate Query Charts

When you combine 2 or more queries on the same chart, it is relatively easy to see their relationship. See the example of the chart that shows both the count of calls and the count of errors.

However, because the two metrics often have significantly different value ranges on the Y axis, it may be difficult to see the detail. By separating the queries into their individual charts, you vertically "expand" the axis, making it easier to visualize patterns and trends.

To separate a graph into its constituent queries, click the Combine all queries into one chart option to deselect it. The interface displays the two charts side-by-side.

Notice that the peaks of avg(aws_logs_error_count) metric are much more pronounced in this rendering.

metrics explorer query two separate
  1. The separate query view also enables you to set alerts directly in the Metrics interface. See Set alert on a metric.

Combine query charts

To combine separate charts, click to select the Combine all queries into one chart option.

Refresh the query

Whenever you load a query, it fetches the results from the specified time interval. If that time interval is relative to now(), as the default of Last 5 minutes, time passes. To refresh the charts, perform a new data fetch.

To refresh the graphs with the same options, follow these steps:

  1. Click the Refresh icon, refresh, at the top right of the interface.

  2. Kloudfuse refreshes the view.

    Here, we start with the side-by-side metric and formula display of metrics a: aws_logs_call_count and b: aws_logs_error_count, and the formula 1: \$\frac{b}{a}100\$, demonstrated in the Add formula section.

    metrics explorer refresh select

    The old time interval was from 21:25:00 to 22:25:00, while the new interval is for the next morning, from 07:00:00 through 08:00:00.

    metrics explorer refresh result

Remove a query

You can remove a query from the interface when working with multiple queries. You cannot remove the only (last) query on the page; instead, select a different query in the first drop-down.

When you specify an object in the search bar, Kloudfuse adds it as a tile. You can add multiple tiles to your query.

To remove one of the tiles, hover your pointer over it and click dismiss (delete).

Here, we are removing query B (B).

metrics explorer query remove select

To clear the query (remove all tiles), hover over and click red dismiss at the end of the line (delete all).

You can use multiple queries in your analysis.

You can further configure the query using aggregations.