The time series and operations specified in the query power the dashboard visualization. After selecting CREATE TILE, choose the tile type you want and click Data to enter one or more PromQL query definitions.

  • Use the PromQL language constructs (attributes, operators, and functions), to select and aggregate time-series data in real-time and slice-time series to create the visualization you want.
  • Use the dashboard autocomplete feature to show all available matching metrics.

When specifying tags, enter a bracket, {, to get a list of all tags associated with the resource.

In the Legend input field, use double-brackets, {{, to list all available tags for the resource. The legend filters and only shows matching tags for the resource.

You can specify multiple queries in a query definition. Click + to add queries.

General query definition syntax

A PromQL query definition has the following general form:

function(metricName{attribute="value"})

The most basic definition is to specify the tag name to select a time series. For example:

google_storage_network_sent_bytes-count

The PromQL language also supports filtering by attribute, functions, operators and regex expressions:

PromQL ConstructExample
Filter on attribute.google_storage_network_sent_bytes-count{region="us-east-1b"}
operatorgoogle_storage_network_sent_bytes_count/(2000^2)
functionsum(google_storage_network_sent_bytes_count)
regex, using RE2 syntaxgoogle_storage_network_sent_bytes-count{region=~"us-east-.+"}