Contructing a Dashboard Panel using PromQL

Step by step guide to create a dashboard panel using PromQL.

Create Panel

In the Dashboard Panel, select the PromQL type to query data using PromQL.

Display Options

  • Type: Select the type of chart.

    PromQL is currently not supported for Histogram visualization type.

  • Query Display Name: A meaningful display name for the legend. The text you enter replaces the metric name displayed in the legend. The default legend title is the metric name. The default legend title is the query itself.

  • Timeseries Name: A display name of the time series for the query using text and any label values returned with the metric.

Query

sum(rate(sysdig_container_net_in_bytes{$__scope}[$__interval])) by (container_id,agent_id)

Specify the following:

Metrics: Search the desired metric. The field supports auto-complete. Enter the text and the rest of the text you type is predicted so you can filter the metric easily. In the example: sysdig_container_net_in_bytes.

Segmentation: This is the process of categorizing aggregated data with labels to provide precise control over the data. Choose an appropriate value for segmenting the aggregated PromQL data. In this example, container_id and agent_id.

Query Options

  • Unit and Y-Axes: Specify the unit of scale and display format.

  • No Data Display: Determine how to display null data on the dashboard.

  • Min. Interval: Specify the minimum interval to replace $__interval. The value must be expressed as a time duration, for example: 10s, 1m, 1h, and must be between 10s and 1d.

  • Compare To: Optionally, you can compare the data against historical data. This is helpful for comparing current usage to past usage when determining the conditions of your infrastructure. To compare the current data with that from a time range in the past, click Enable and select the Range Offset and time unit. The supported time units are, Hour, Day, Week, and Month.
    When segmentation is applied, comparing time series against historical data is not supported.

  • Axes: Determine scale, unit, display format, and gauge for the Y-axes.

  • Legend: Determine the position of the legend in the Dashboard.

  • Panel: Specify a name and add details about the panel. See Create a New Panel for details.