Skip to main content
The Expression Browser is Prometheus’s lightweight web UI for running PromQL queries and drawing quick graphs. It’s ideal for ad-hoc queries and troubleshooting—inspect metric labels, query values at specific times, and test PromQL expressions. It is not designed for building dashboards or long-term monitoring; use a dedicated dashboarding tool (Grafana, etc.) for that.
A dark-themed slide titled "Expression Browser" describing a built-in web UI for executing queries and simple graphs. It notes the tool has limited functionality for ad-hoc queries and quick debugging and cannot build custom dashboards for day-to-day monitoring.
The Expression Browser is excellent for experimentation: test PromQL expressions, validate label fingerprints, and verify the behavior of instant vs range vectors before promoting queries to dashboards.

Quick access

  1. Open your browser and navigate to your Prometheus server, for example: http://<PROMETHEUS_IP>:9090
  2. The default view is the Query page. Enter PromQL expressions in the query box and click Execute.
For full PromQL reference, see the official Prometheus docs: Prometheus Querying Basics.

Query box and autocomplete

  • The query input supports autocomplete for metric names and functions. Toggle autocomplete via the checkbox in the UI.
  • Autocomplete speeds up discovery of available metrics and reduces typos.
Common node exporter metrics (autocomplete will show similar names and types):

Execute queries and inspect results

  • Type a PromQL expression in the Query box and click Execute.
  • The UI displays matching series with labels and current values.
  • Use the “Evaluation time” dropdown to evaluate queries at a past timestamp.
  • Understand vector types:
    • Instant vectors: single sample per series at a specified timestamp (used by the Graph page).
    • Range vectors: sequences of samples over a time range (used by functions like rate()).
Examples (enter these in the Query box):
Example outputs (as shown in the Expression Browser):
Range vectors cannot be plotted directly on the Graph page. Wrap range vectors with functions that return instant vectors (for example, rate() or increase()) before plotting.

Panels

  • The Query page supports multiple panels so you can run several queries side-by-side.
  • Each panel has its own query box and results area — useful for comparing series or testing variations of a query.

Graph page — plotting queries

  • The Graph tab visualizes query results over time. The Graph expects an instant vector (or an expression that evaluates to an instant vector).
  • Supplying a raw range vector directly to the Graph page will produce an error:
  • For time-based rates or derivatives, wrap a range-vector expression with a function that returns an instant vector. Common example for counters:
  • After evaluating to an instant vector, the Graph page will render the time-series. Use the graph time window selector (e.g., 30m, 2h) and the evaluation time control to view historical data.
Example — graphing CPU rates per mode:
Example output for the above (instant-vector result):
  • The graph legend shows one entry per returned series (for example, different mode label values). Click legend entries to toggle series visibility.

Summary and best practices

  • Use the Expression Browser for:
    • One-off PromQL evaluations and debugging.
    • Inspecting label sets, sample values, and behavior of functions.
  • Remember:
    • The Query page is for ad-hoc evaluation; the Graph page expects instant vectors.
    • Use rate() or similar functions to convert range vectors into plottable instant vectors.
  • For production dashboards and alerting, use a dedicated visualization tool and promote validated queries from the Expression Browser into that environment.
Further reading and references:

Watch Video