On This Page

Home / Search/ Metrics (Preview)/Build a Metrics Query

Build a Metrics Query ​

Preview Feature ​

Cribl is still developing this Preview feature. We don’t recommend using it in a production environment, because the feature might not be fully tested or optimized for performance, and related documentation could be incomplete.

Please continue to submit feedback through normal Cribl support channels, but assistance might be limited while the feature remains in Preview.

In the Metrics Explorer, choose a metric, filter it, split it by dimensions, and combine queries, without writing a query language.


Open the Metrics Explorer ​

On the Cribl.Cloud top bar, select Products > Search > Metrics.

The Metrics view has two tabs:

  • Explore: Build and visualize metric queries. This tab is described on this page.
  • Summary: A catalog and health view of every metric. See Explore the Metrics Catalog.

Build a Query ​

The Metrics Explorer lets you build a query visually, without writing a query language. After you choose a metric and a time range, Cribl Search returns a visualization of that data.

  1. Select a metrics Dataset to query. Each lakehouse engine has its own metrics Dataset, so choose the one that holds the metrics you want. Your Metric Dataset rules determine which Dataset that is. The list shows only the metrics Datasets you can access. See Metrics Permissions.

  2. Select a metric from the catalog of metric names that Cribl Search maintains for all ingested data. You can pick any metric name with no perceptible latency. To find a metric in the catalog:

    • Use the Filter metrics box to narrow the list by name.
    • Use the type filter to show only All, Counter, Gauge, or Histogram metrics.
    • Sort the list by Relevance, Value, Change, A → Z, or Z → A.

    By default, the browser shows only metrics that currently have data.

  3. Filter the metric’s time series by one or more dimensions that apply to that metric. Dimensions are the key-value attributes attached to a metric, and are often called labels in other tools.

  4. Choose a transformation to apply to the metric value before it is returned. Common transformations include:

    • count
    • sum
    • avg
    • min
    • max
    • stddev
    • rate

    This is a sample, not the full set - open the transformation dropdown to see every transformation available.

  5. Adjust the time range with the timepicker, and optionally set the display timezone.

Split by Dimensions ​

To break a metric down into separate series, split it by one or more dimensions. Splitting by a dimension returns one series per value of that dimension, so you can compare those values.

Combine Metrics ​

Add more queries - labeled A, B, and so on - and combine them with an expression (a formula). For example, take the difference between two metrics, multiply one metric by another, or apply mathematical functions and constants.

Edit the Query Expression ​

Select Code to switch from the visual builder to a query editor that shows the exact PromQL the builder generates. The visual builder and the Code editor stay in sync, so you can build a query visually and then read or refine the generated PromQL, or paste in raw PromQL from an external source.

Next Steps ​