Using PromQL Query Explorer

Use the PromQL Query Explorer to run PromQL queries and build infrastructure views.

You’ll find PromQL Query on the Explore slider menu on the Sysdig Monitor UI. To access it, click Explore > PromQL Query.

Query with PromQL

The PromQL field supports manually building PromQL queries. You can enter simple or complex PromQL queries and build dashboards and create alerts. The PromQL Query Explorer allows running up to 5 queries simultaneously.

Explore metrics and labels available in your infrastructure

For example, calculate the number of bytes received in a selected host:

sysdig_host_net_total_bytes{host_mac="0a:e2:e8:b4:6c:1a"}

Calculate the number of bytes received in all the hosts except one:

sysdig_host_net_total_bytes{host_mac!="0a:a3:4b:3e:db:a2"}

Compare current data with historical data:

sysdig_host_net_total_bytes offset 7d

Use arithmetic operators to perform calculations on one or more metrics or labels

For example, calculate the rate of incoming bytes and convert it to bits:

rate(sysdig_host_net_total_bytes[5m]) * 8

Build complex PromQL queries

For example, return summary ingress traffic across all the network interfaces grouped by instances

sum(rate(sysdig_host_net_total_bytes[5m])) by (container_id)

Label Filtering

StepsPreview
Label filtering to automatically identify common labels between queries for vector matching. In the given example, you can see that A and B queries have 8 labels in common as highlighted in the [A∩B] section.

Filter by using the relational operators available in the time series table. Simply click the operator for it to be automatically applied to the queries. Run the queries again to visualize the metrics.

Explore labels, view documentation, and perform filtering by using rational operators from the label selector.

Time Navigation

To learn how to use the Time Navigation, see Time Navigation.

Toggle Query Results

StepsPreview
Click the respective query buttons, for example, A or B, to show or hide query results.

Learn More

To take the exploration further, users can:

  • Create an Alert that enables you to craft a Prometheus Alert based on one of the selected queries.
  • Create Dashboard Panel which lets you add the selected metrics to a new dashboard panel.